how to mod_rewrite for a CI app on a subfolder |
[eluser]+__+[/eluser]
let's say i have a uploaded my app to http://www.mysite.com/myapp/ how should i go about writing the .htacess file to remove index.php from this app? Searched on the forum but none of the suggestions worked for me. i tried with the one from the wiki Code: <IfModule mod_rewrite.c> if i go to http://www.mysite.com/myapp/ or http://www.mysite.com/myapp/index.php i see that the default controller runs and loads default view, but cannot i load other controllers with http://www.mysite.com/myapp/controller_2 -> gives a codeigniter 404 page http://www.mysite.com/myapp/index.php/controller_2 -> gives browser's default "page not found" page
[eluser]Kindari[/eluser]
This one should work. Code: <IfModule mod_rewrite.c> Note that the only thing you should change is the ErrorDocument command, that must be the full path including subdirectory to your index file. so in example.com/myapp/index.php it would be ErrorDocument 404 /myapp/index.php
[eluser]+__+[/eluser]
that part is only valid if mod_rewrite is not installed, for my case it's installed and changing that part does not do anything.
[eluser]+__+[/eluser]
turns out godaddy needed a different configuration, everything works fine now. |
Welcome Guest, Not a member yet? Register Sign In |