Welcome Guest, Not a member yet? Register   Sign In
htaccess redirects
#1

[eluser]brian88[/eluser]
For my codeigniter project I have the following code in my .htaccess

Code:
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

When I go to mysite.com it redirects me to www.mysite.com.... great

But when I go to mysite.com/any_page it redirects to www.mysite.com/index.php?/any_page, which is invalid and just goes to the home page

My uri_protocol= AUTO;

Any ideas?


Messages In This Thread
htaccess redirects - by El Forum - 07-16-2012, 07:07 AM
htaccess redirects - by El Forum - 07-16-2012, 10:20 AM
htaccess redirects - by El Forum - 07-16-2012, 10:35 AM



Theme © iAndrew 2016 - Forum software by © MyBB