Mod rewrite - completely stuck!! |
[eluser]olivzgraham[/eluser]
I have been trying for absolutely ages, and I cannot get mod_rewrite to work to remove the /index.php/ section of my urls!! I am using mac os x lion, and the site i am developing is located at: macintosh hd > users > livvy > sites > barbaraolive my .htaccess file is inside my code igniter application folder, and is as follows Code: <IfModule mod_rewrite.c> I am using a virtual host to access my site at http://barbaraolive.local Code: <VirtualHost *:80> which works fine. i really can't work out how to make this work!! does anyone have any tips on how to debug this, or how i might be able to get it to work? i feel like I've tried everything
[eluser]NeoArc[/eluser]
Sometimes is the fault of this configuration value: /* |-------------------------------------------------------------------------- | Index File |-------------------------------------------------------------------------- | | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = '';
[eluser]olivzgraham[/eluser]
Thanks for the quick response, i have already made that change...
[eluser]vitoco[/eluser]
First check that mod_rewrite it's enabled, check phpinfo() for "mod_rewrite" . Second use this simple .htaccess file to check if your server works ( it's working on mine ) Code: Options +FollowSymLinks If it works, it's your code, if it doesn't, it's the server. Saludos
[eluser]CroNiX[/eluser]
Code: <IfModule mod_rewrite.c>
[eluser]olivzgraham[/eluser]
i checked phpinfo, mod_rewrite is enabled. vitoco, the .htaccess file you provided still doesn't work! again, http://barbaraolive.local/index.php/site works, but http://barbaraolive.local/site doesn't! I get the requested url /site/ was not found on this server error. in php.ini, the module was called mod_rewrite.so, so i altered my original .htaccess to use Code: <IfModule mod_rewrite.so>
[eluser]vitoco[/eluser]
I don't know if this is the problem, but you didn't define override directives Try this Code: <VirtualHost *:80> Slds.
[eluser]olivzgraham[/eluser]
nope... in my error log: [Sun Aug 05 11:12:39 2012] [error] [client 127.0.0.1] File does not exist: /Users/livvy/Sites/barbaraolive/site in my access log: ::1 - - [05/Aug/2012:11:15:54 +0100] "GET /~livvy/barbaraolive/site HTTP/1.1" 404 331 it's looking for something that doesn't exist! site is my controller... |
Welcome Guest, Not a member yet? Register Sign In |