![]() |
Problem removing 'index.php' with .htaccess - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem removing 'index.php' with .htaccess (/showthread.php?tid=8889) |
Problem removing 'index.php' with .htaccess - El Forum - 06-04-2008 [eluser]shanecavaliere[/eluser] I've been looking around and trying different methods, but I can't seem to get it to work. Can anybody please let me know what I'm doing wrong? My .htaccess file is in my site's root (as is my CI installation). I got this from the CI wiki: Code: <IfModule mod_rewrite.c> And I also changed my system/application/config/config.php so that the 'index_page' line says: Code: $config['index_page'] = ''; But it's still not working - I still need to include /index.php/ in the URL for it to work properly. What am I missing? Thanks in advance for any help! Problem removing 'index.php' with .htaccess - El Forum - 06-04-2008 [eluser]shanecavaliere[/eluser] Edit: Thought I figured it out, but I didn't... Still not working. Problem removing 'index.php' with .htaccess - El Forum - 06-04-2008 [eluser]Tom Glover[/eluser] Thanks for posting your solution this will help other people with the same issue. EDIT: Maybe not then! ![]() ![]() Problem removing 'index.php' with .htaccess - El Forum - 06-04-2008 [eluser]shanecavaliere[/eluser] Thanks ![]() Problem removing 'index.php' with .htaccess - El Forum - 06-04-2008 [eluser]louis w[/eluser] Here is my htaccess. Maybe try something simpler like this before blocking certain folders, etc. Code: RewriteEngine on Problem removing 'index.php' with .htaccess - El Forum - 06-04-2008 [eluser]Sean Murphy[/eluser] What is an example URL you're trying? Also, turning on the mod_rewrite log can be very helpful in shorting these issues out. Just don't leave it on all the time, it slows down processing. Code: RewriteLog /Applications/MAMP/logs/mod_rewrite_log Problem removing 'index.php' with .htaccess - El Forum - 06-04-2008 [eluser]louis w[/eluser] I did not even know ModRewrite could log. Where do you put that? I tried placing it in my .htaccess and it a server 500. Apache logs says "RewriteLog not allowed here" Problem removing 'index.php' with .htaccess - El Forum - 06-04-2008 [eluser]shanecavaliere[/eluser] I'm trying http://example.com/index.php/blog/, but I want it to be http://example.com/blog/ instead. (I'm going through the documentation tutorials). Problem removing 'index.php' with .htaccess - El Forum - 06-04-2008 [eluser]louis w[/eluser] Did you try my htaccess? Do you get a CI 404, or apache 404 page? Does your blog controller have an index or _remap method? Problem removing 'index.php' with .htaccess - El Forum - 06-04-2008 [eluser]Sean Murphy[/eluser] [quote author="louis w" date="1212625377"]I did not even know ModRewrite could log. Where do you put that? I tried placing it in my .htaccess and it a server 500. Apache logs says "RewriteLog not allowed here"[/quote] It's a recent discovery for me too :-) You put it in the server or vhost config. http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritelog |