![]() |
.htaccess - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: .htaccess (/showthread.php?tid=40115) |
.htaccess - El Forum - 03-30-2011 [eluser]jupiter1031[/eluser] I am unable to bypass index.php. I have used various .htaccess variations but no luck. I am using a standard setup, application directory is directly in root directory, style.scc is directly in root directory, so is the images directory. I am hosting on fatcow.com, using php5. What do I need to look for in order for it to work? I have read various forum entries and the help files. I am not experienced in server configurations. My first question is: I assume the .httacces file needs to be only in the root directory? .htaccess - El Forum - 03-30-2011 [eluser]Gerep[/eluser] Hi jupiter. Yes, the file must be only in the root. You have to change the following line on your file: Code: <IfModule mod_rewrite.c> to Code: <IfModule mod_rewrite.c> And remember to take the index.php value from config.php #29 Code: $config['index_page'] = ''; Code: $config['base_url'] = 'http://www.your_site.com'; Hope it helps .htaccess - El Forum - 03-30-2011 [eluser]jupiter1031[/eluser] I did what you suggested, but it did not work. Don't I have to tell the server to include index.php? .htaccess - El Forum - 03-30-2011 [eluser]Gerep[/eluser] Jupiter, I use this htacces and it is working fine. Are you running your code on a Windows server? .htaccess - El Forum - 03-30-2011 [eluser]jupiter1031[/eluser] I am not a server expert but I just saw it is a Debian platform. I have fatcow.com hosting. Since no .httaccess version worked, I suspect there must be a server setting that does not allow this feature. Any idea what to look for? .htaccess - El Forum - 03-30-2011 [eluser]InsiteFX[/eluser] The file has to be in the root directory with index.php Code: <IfModule mod_rewrite.c> InsiteFX .htaccess - El Forum - 03-31-2011 [eluser]jupiter1031[/eluser] Thank You for this detailled and commented .htaccess file. I still have not figured out how to get it to work on my end. Do you have any experience of how to best appoach this. Is anzbody else out there with similar experiences? Thanks to all of you for your support! |