sample .htaccess code does not work as described |
[eluser]shark72[/eluser]
I'd like to remove the "index.php" from my URLs, so that controllers are called with mysite.com/controller, rather than mysite.com/index.php/controller. On this page: http://ellislab.com/codeigniter/user-gui.../urls.html These .htaccess contents are given as an example of one way to address it: Code: RewriteEngine on However, on my system, it breaks it further. Without this .htaccess file: mysite.com and mysite.com/index.html are interchangeable mysite.com/index.html/controller works as expected mysite.com/controller generates a 404 (also as expected) With the .htaccess file given in the example: mysite.com and mysite.com/controller simply display "no input file specified" mysite.com/index.php and mysite.com/index.php/controller load but with missing CSS (probably because my CSS directory is not excluded along with images and robots) So I'm guessing that either the example .htaccess is a little buggy as presented, or there's something more fundamentally wrong with my site's setup. I'm guessing the latter. Any ideas?
[eluser]jzmwebdevelopement[/eluser]
Try: Code: # Customized error messages.
[eluser]shark72[/eluser]
Thank you very much! That didn't entirely fix it, but made it a little better, so I know I'm on the right track. Now, "mysite.com/controller" displays "No input file specified" rather than a 404. I'll hack on your version of the .htaccess, but if you or anybody else has any further insite, that would be great as well.
[eluser]shark72[/eluser]
You got me in the right direction and searching the forum solved it. Changing this line: RewriteRule ^(.*)$ /index.php/$1 [L] To: RewriteRule ^(.*)$ /index.php?/$1 [L] Solves it! Apparently the latter is required for PHP5, although I don't see the relation between the PHP implementation and Apache's mod_rewrite engine.
[eluser]InsiteFX[/eluser]
Code: <IfModule mod_rewrite.c> InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |