mod_rewrite |
[eluser]timaksu[/eluser]
so i developed my app and it works all good now. i gave it out to people to try and got alot of errors popping up all over the place. mod_rewire is the culprit, and users dont all have it enabled..which leads to 404's everywhere. now i dont know what to do. offer an option without a clean url? how will that work with the clean url? ive already finished the app, i need to go back and redo all my links? is there an alternative to mod_rewrite? :gulp:
[eluser]Dam1an[/eluser]
Workaround: Assuming you've done your links using the anchor function, you just need to checnge index_page in the config file to be 'index.php' and all your links will be back to normal Solution: If you know where mod_rewrite.c (or .so) is, you could maybe check if that file exists, and if so, have index_page to nothing, else having it to 'index.php' This is of course assuming that its enabled if they have it, although I assume thats in your .htaccess file to include it
[eluser]timaksu[/eluser]
awesome. i replaced the indexpage area in config.php with : Code: if(in_array('mod_rewrite',apache_get_modules())) { and the .htaccess is Code: <IfModule mod_rewrite.c> the php checks to see if we have mod_rewrite enabled, and if we do we use index.php/ and it works fine with the rest of the site. i was using base_url() for my anchors (Adding page names to the end as needed, eg; echo base_url()."welcome/etc" would i have any problems with this? compatibility etc?
[eluser]Dam1an[/eluser]
using base_url could be problamatic, see this thread Basically, base_url doesn't return with URL with index.php even if its set as your index_page in config, but site_url does
[eluser]Unknown[/eluser]
Hi, a newbie with a newbie question. This is maybe a stupid question. Can't I remove /index.php/ from URL without mod_rewrite (my free webhost doesn't provide it)? I mean is there any internal CI codes that can do this? Thanks.
|
Welcome Guest, Not a member yet? Register Sign In |