Welcome Guest, Not a member yet? Register   Sign In
Can't remove index.php from the URL
#11

[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
#12

[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.
#13

[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
AAUUGH!
#if .htaccess IS used, this file will cause an Internal Server Error 500.
#if .htaccess is NOT used, then there will be no error.
#14

[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?
#15

[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:
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/home/content/user/html">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

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.
#16

[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.
#17

[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
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
but when I access mysite/blog I get "No input file specified"

my index is in the root directory of my site
#18

[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? Wink
#19

[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
RewriteCond $1 !^(index\.php|public|user_guide|robots\.txt)
RewriteRule ^(.*)$ /index.php?/$1 [L]
#20

[eluser]Colin Williams[/eluser]
Likely related to http://ellislab.com/codeigniter/user-gui...oting.html




Theme © iAndrew 2016 - Forum software by © MyBB