![]() |
How to remove index.php from URL - 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: How to remove index.php from URL (/showthread.php?tid=58032) |
How to remove index.php from URL - El Forum - 05-07-2013 [eluser]ebrahimthex[/eluser] How can i remove index.php in my LAMP Server. This works: http://localhost/mysite.com/index.php/home But this generates 404 errors: http://localhost/mysite.com/home Code: <VirtualHost *:80> and this is my .htaccess in /var/www/russelhost/ Code: RewriteEngine on Code: $config['index_page'] = “index.php” by $config['index_page'] = “” Now What Can i do? How to remove index.php from URL - El Forum - 05-08-2013 [eluser]ebrahimthex[/eluser] How can i remove index.php in Codeigniter URL? USE LAMP Server. This works: http://localhost/mysite.com/index.php/home But this generates 404 errors: http://localhost/mysite.com/home Code: <VirtualHost *:80> and this is my .htaccess in /var/www/russelhost/ Code: RewriteEngine on Code: $config['index_page'] = “index.php” by $config['index_page'] = “” Now What Can i do?[/quote] How to remove index.php from URL - El Forum - 05-16-2013 [eluser]Unknown[/eluser] Hey Guys my name is Mark.According to that topic well i think that if you want to remove index.php from URL then you should use that coding for that purpose: RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.php\ HTTP/ RewriteRule ^(([^/]+/)*)index\.php$ http://www.%{HTTP_HOST}/ [R=301,NS,L] |