Welcome Guest, Not a member yet? Register   Sign In
HTTP/HTTPS, without index.php, using htaccess, plus XHR
#15

[eluser]Unknown[/eluser]
For some reason the .htaccess versions from Phil_b and terminate were not working for me but the following does.
I read on other forums that the remove index rule for codeigniter should go at the bottom, that is after the HTTP/HTTPS handling, and then in that case I had to remove the L definition for those two rules.

This was really giving me headaches, so am posting just in case anyone else experience the same issues as me. I am not sure about what was causing the difference though as the versions posted here should have worked in theory. The only difference I see is that I have codeigniter placed in a subfolder on my server.

Code:
RewriteEngine on

Options +FollowSymLinks

RewriteBase /subfolder/

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} (auth|register|secure|payment)
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,QSA]

RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(static|auth|register|secure|payment)
RewriteRule ^(.*)$ http://%{SERVER_NAME}%{REQUEST_URI} [R=301,QSA]


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1


Messages In This Thread
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 07-23-2008, 09:42 PM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 12-09-2008, 05:08 PM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 12-09-2008, 11:45 PM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 06-18-2009, 02:16 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 01-18-2010, 02:44 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 01-18-2011, 01:24 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 02-03-2011, 08:44 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 02-05-2011, 01:20 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 02-05-2011, 01:22 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 02-05-2011, 08:19 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 05-06-2011, 03:24 PM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 06-15-2012, 06:10 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 06-15-2012, 06:14 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 07-13-2012, 04:32 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 08-01-2012, 08:29 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 08-17-2012, 09:22 AM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 09-07-2012, 08:11 PM
HTTP/HTTPS, without index.php, using htaccess, plus XHR - by El Forum - 05-22-2014, 01:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB