need help with removing index.php |
[eluser]CI705[/eluser]
hi all, I am really struggling with the removal of index.php for hours. I have been following the steps in http://codeigniter.com/wiki/mod_rewrite/ (except step4 coz i don't really know where to chagne it) but with no luck. i am using Quote:debian squeeze here is the structure in the www folder Quote:/var/wwwand the .htaccess, which i put it inside the CI folder as well Quote:<IfModule mod_rewrite.c>and this is the httpd.conf Quote:#SeverName 127.0.0.1 here is the config.php Quote:$config['base_url']= 'http://127.0.0.1/CI';I can only access the http://127.0.0.1/CI/index.php/welcome but not http://127.0.0.1/CI/welcome I am really frustrated on this problem and i can't solve it myself. thanks for any help.
[eluser]Vlad Balmos[/eluser]
change Code: RewriteRule ^(.*)$ index.php?/$1 [L] to this: Code: RewriteRule ^(.*)$ /CI/index.php/$1 [L] and see what happens
[eluser]CI705[/eluser]
[quote author="Vlad Balmos" date="1311858900"]change Code: RewriteRule ^(.*)$ index.php?/$1 [L] to this: Code: RewriteRule ^(.*)$ /CI/index.php/$1 [L] and see what happens[/quote] thanks for the reply i tried Code: <IfModule mod_rewrite.c> Code: Not Found
[eluser]Vlad Balmos[/eluser]
Ok, try this instead: Remove the following from the .htacces file: Code: RewriteCond %{REQUEST_URI} ^system.* and change the uri_protocol to 'auto' in your config file. Maybe the server doesn't populate the Request_uri variable. if that still doesn't work. Create a virtual host in apache, for example www.localsite.loc (read the apache docs for this), after that add the following lines in your /etc/hosts file: Code: 127.0.0.1 localsite.loc restart the webserver, modify the base_url in config.php to point to www.localsite.loc and finally replace .htaccess with this: Code: RewriteEngine on
[eluser]CI705[/eluser]
thanks for the help Vlad Balmos. I have figured out what the problem is. It is the step 4 from the wiki which I didn't follow. I am writing it down so it may help others and saving their hours of time. edit /etc/apache2/sites-available/default Code: DocumentRoot /var/www cheers, i am so happy now, thanks for the help again.
|
Welcome Guest, Not a member yet? Register Sign In |