CodeIgniter - removing index.php

I have some problems deleting the index.php object when installing CI, the current .htaccess im is used as follows:

<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / #Removes access to the system folder by users. #Additionally this will allow you to create a System.php controller, #previously this would not have been possible. #'system' can be replaced if you have renamed your system folder. RewriteCond %{REQUEST_URI} ^system.* RewriteRule ^(.*)$ /index.php?/$1 [L] #When your application folder isn't in the system folder #This snippet prevents user access to the application folder #Submitted by: Fabdrol #Rename 'application' to your applications folder name. RewriteCond %{REQUEST_URI} ^application.* RewriteRule ^(.*)$ /index.php?/$1 [L] #Checks to see if the user is attempting to access a valid file, #such as an image or css document, if this isn't true it sends the #request to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] </IfModule> <IfModule !mod_rewrite.c> ErrorDocument 404 /index.php </IfModule> 

My CI installation is coming back from the public_html directory, and I changed the configuration to

 $config['index_page'] = ""; 

So my CI is as follows

 /core-1.7.3 /public_html/index.php 

When I type url, I get 404, but when I put index.php in front of it, it works fine: S

Im confused

+3
codeigniter
Mar 05 2018-11-11T00:
source share
4 answers

Also try changing this:

 $config['uri_protocol'] = "REQUEST_URI" 
0
Mar 05 2018-11-11T00:
source share

Hi I installed this 1.7.3 and this .htaccess worked with this url -

 /CodeIgniter_1.7.3/public_html/welcome 

.htaccess →

 RewriteEngine On RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] 
0
Mar 05 2018-11-12T00:
source share

Work with the Avisek Chakraborty commentary and make sure you have done everything, but it sounds like you don't have mod_rewrite right. Verify that this is done using the following test: http://www.wallpaperama.com/forums/how-to-test-check-if-mod-rewrite-is-enabled-t40.html

It is written for windows, but you should get this idea.

If it does not work, set mod_rewrite and try again.

0
May 2 '11 at 15:15
source share

You need a FollowSymLinks directive to overwrite .htaccess ...

 Options Indexes FollowSymLinks <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> 

The Options directive is in Apache Docs

0
Sep 25 '12 at 18:52
source share



All Articles