Can't remove index.php from the URL |
[eluser]chotz[/eluser]
Hi Dan, 1) I am not using any server software. Just Apache web server. 2) Yes my directory structure is the same as you have mentioned -htdocs --system --index.php ---application ----controller -----GameDev ----models -----GameDev ----views -----GameDev 3) $config[‘base_url’]="http://localhost/"; $config[‘index_page’]="index.php"; $config['uri_protocol'] = "AUTO"; I had used the RewriteBase / previously. But it didn't work. Guess i am confused with the combinations of Rewrite conditions. -Arun
[eluser]chotz[/eluser]
I recently changed the the $config['index_page']="index.php" to continue with my work. otherwise i know it has to be blank.
[eluser]Daniel Moore[/eluser]
It looks like from your listing you may have index.php in your system folder. Make sure it is in the htdocs folder. Open up your config.php and find the line that contains "$config['uri_protocol']. Try each of the values listed in the comment above it one at a time ('PATH_INFO', 'QUERY_STRING', 'REQUEST_URI', and 'ORIG_PATH_INFO') and see if that fixes the problem. 'AUTO' may not be the right one for you. It doesn't work on my setup. You must try each $config['uri_protocol'] with each version of .htaccess until one works. It's trial and error. One of them will work for your setup, you just have to find which one. Also, make sure your .htaccess file is being accessed. Set up an .htaccess file containing only the following: Code: #test to see if .htaccess is used
[eluser]chotz[/eluser]
i tried with the .htaccess file you posted. It does not give any error. I think this might be the problem. What should i do now?
[eluser]Daniel Moore[/eluser]
This means your AllowOverride directive is set to “None” in your Apache configuration file. You will need to change this setting. Locate your httpd.conf file. Open it in your text editor. Where your have your document root set up, specifically the section after it that configures the directory. An example would be as follows: Code: # Yours is a different directory, as you are using the "htdocs" directory and I am not. My file is located in /apache/conf/httpd.conf. Yours may or may not be in the same location, depending on your installation.
[eluser]chotz[/eluser]
Yippeee finally it works! Thank you so much Dan,@Dam1an. Dan you were right "AllowOverride" was set to "none" in httpd.conf. I changed it to "all" and it works now! and in code igniter config file, 'AUTO', PATH_INFO and REQUEST_URI options work.
[eluser]directone[/eluser]
I'm just loading up CI and I get the same problem. I checked .htaccess is being accessed OK. I set it up with Code: RewriteEngine on my index is in the root directory of my site
[eluser]DimCI[/eluser]
>>...I’d ask server admins whether they have blocked any .htaccess-related capabilities in their .conf files may be.. >> so,wasn't i right in the end?
[eluser]directone[/eluser]
OK. got it going. Dreamhost kindly pointed me to http://ellislab.com/forums/viewreply/585938/ which has a slightly different .htaccess Code: RewriteEngine on
[eluser]Colin Williams[/eluser]
Likely related to http://ellislab.com/codeigniter/user-gui...oting.html |
Welcome Guest, Not a member yet? Register Sign In |