rosscoD Posted April 24, 2010 Share Posted April 24, 2010 (edited) I'm needing to force SSL on every page of my site as I have a custom AJAX login system which will not work unless the current page is using HTTPS. I have tried forcing HTTPS in my WHMCS directory on my server but it errors. Could someone tell me how to force SSL for all pages? RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.mysite.com/billing/$1 [R,L] the above causes a redirect error. Edited April 24, 2010 by rosscoD 0 Quote Link to comment Share on other sites More sharing options...
robb3369 Posted April 24, 2010 Share Posted April 24, 2010 Try this instead: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} /billing/ RewriteRule ^(.*)$ https://www.mysite.com/billing/$1 [R,L] This way only urls in the billing path are redirected, not every ones... 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.