Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] .htaccess redirect from https to http shows the "index.php?"
#1

[eluser]Joakim_[/eluser]
Hi.

I trying to redirect all https to http, except one auth controller.

The problem is that the "index.php?" shows up when doing a redirect.

So if you enter:

https://example.com/test/

You are redirected to http but the address will look like this:

http://example.com/index.php?/test

The .htaccess file looks like this:

Code:
RewriteEngine On

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

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

RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !(auth)
RewriteRule ^(.*)$ http://%{SERVER_NAME}%{REQUEST_URI} [R=301]

Any help are very appreciated! Smile

Thanks!


Messages In This Thread
[SOLVED] .htaccess redirect from https to http shows the "index.php?" - by El Forum - 12-29-2008, 09:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB