0

Possible Duplicate:
how to remove index.php from url in codeigniter ?

I want to remove index.php from the codeigniter url. I have created .htaccess file and placed the following code on it (as found on the CodeIgniter website. But i can not access anything on the localhost. I get the error "Not Found", if i place the code in the .htaccessfile.

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

My url looks like localhost/test/project/index.php

0

3 Answers 3

1

did you remove index.php like so

$config['index_page'] = '';

from the config file in your config folder from application ?

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

Comments

0
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)$ index.php

1 Comment

This detailed explainer video can be helpful: youtu.be/gG-AP1n7mjU
0

If you have tried everything in the user guide and had no luck it may be an issue with your local setup. If you are on a Mac there may be an issue with your Apache setup. I would check /etc/apache2/[username].conf and make sure that you have AllowOverride set to All.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.