.htaccess weird behavior, only homePage display - 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: .htaccess weird behavior, only homePage display (/showthread.php?tid=53201) |
.htaccess weird behavior, only homePage display - El Forum - 07-14-2012 [eluser]DocFunky![/eluser] Hi, I followed the official documentation to use a rewrite URL, but I got some weird behavior. I can access to the main page, but when I try to access any of the other methods or class, I get redirected to wamp homepage, do you know why ? I did exactly what it is said in the wiki, and my . htaccess file is exactly the same. Thank you EDIT: Maybe I made an error in here : <Directory "/some/absolute/path/htdocs"> My path could be wrong. What would be the correct path to my www/codeigniter project ? What about other project in my www directory ? do they need an .htaccess too ? .htaccess weird behavior, only homePage display - El Forum - 07-14-2012 [eluser]skunkbad[/eluser] [quote author="DocFunky!" date="1342300141"]Hi, I followed the official documentation to use a rewrite URL, but I got some weird behavior. I can access to the main page, but when I try to access any of the other methods or class, I get redirected to wamp homepage, do you know why ? I did exactly what it is said in the wiki, and my . htaccess file is exactly the same. Thank you EDIT: Maybe I made an error in here : <Directory "/some/absolute/path/htdocs"> My path could be wrong. What would be the correct path to my www/codeigniter project ? What about other project in my www directory ? do they need an .htaccess too ?[/quote] Are you sure that your base URL and protocol in config/config are set correctly? Also, in wamp I believe you need to use a special RewriteBase in your .htaccess. .htaccess weird behavior, only homePage display - El Forum - 07-14-2012 [eluser]DocFunky![/eluser] Well my base is : $config['base_url'] = ''; and URI Protocol is : $config['uri_protocol'] = 'QUERY_STRING'; The index is set on '' too. Should I configure the base_url differently ? Thanks ! .htaccess weird behavior, only homePage display - El Forum - 07-14-2012 [eluser]InsiteFX[/eluser] Try Code: $config['uri_protocol'] = 'REQUEST_URI'; Also it would help to see your .htaccess file. .htaccess weird behavior, only homePage display - El Forum - 07-15-2012 [eluser]DocFunky![/eluser] Hello, my .htaccess file is exactly the same than the one given in the wiki, which means : Code: <IfModule mod_rewrite.c> And here is my httpd.conf Code: <Directory /> I tried Code: $config['uri_protocol'] = 'REQUEST_URI'; Thank you ! .htaccess weird behavior, only homePage display - El Forum - 07-15-2012 [eluser]skunkbad[/eluser] Try a different RewriteBase .htaccess weird behavior, only homePage display - El Forum - 07-15-2012 [eluser]DocFunky![/eluser] Okay, I rewrote the first lines and it works fine now, I just replace the 3 first lines by : Code: <IfModule mod_rewrite.c> |