0

I have a problem with removing the "index.php" from my URL in CodeIgniter.

I tried as to change my .htaccess file to :

RewriteEngine On
RewriteCond $1 !^(index\.php|(.*)\.swf|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

I also tried to change $config['index_page'] to '' and to change $config['uri_protocol'] to 'REQUEST_URI' but it won't work.

I've also added these lines to etc/apache2/apache2.conf :

Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all

bu it didn't worked either.

1 Answer 1

1

Try this one:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

You'll find other solutions here: How to remove "index.php" in codeigniter's path

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.