awebbdesign Posted January 31, 2011 Share Posted January 31, 2011 Hi All, Below I have the following code... RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} Which works fine on he domain, however when I go into a subfolder it says... Too many redirects occurred trying to open “https://purple-orchid.co.uk/test/index.php”. This might occur if you open a page that is redirected to open another page which then is redirected to open the original page. Can anyone modify my code so that subfolder don't cause an issue (and sub-sub folder i.e https://www.purple-orchid.co.uk/test/admin/) Much appreciated Quote Link to comment https://forums.phpfreaks.com/topic/226230-re-direct-to-ssl/ Share on other sites More sharing options...
JonnoTheDev Posted January 31, 2011 Share Posted January 31, 2011 Last line RewriteRule (.*) https://www.yourdomain.com/$1 [R=301,L] Quote Link to comment https://forums.phpfreaks.com/topic/226230-re-direct-to-ssl/#findComment-1167835 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.