htaccess redirects |
[eluser]brian88[/eluser]
For my codeigniter project I have the following code in my .htaccess Code: <IfModule mod_rewrite.c> 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?
[eluser]CroNiX[/eluser]
Yes, your CI rules should be dead last in your htaccess, after any other redirects or other manipulation take place. Otherwise, if you go to "yoursite.com/anypage", it hits the first rules dealing with CI. So it then passes the request to CI, which processes it. Now it comes to your force www rule and says "oops", no www, redirect the whole thing to www and start over. Code: RewriteEngine On
|
Welcome Guest, Not a member yet? Register Sign In |