1

i have try a few solution from any source, but still cannot remove index.php if my project in other folder like : http://localhost/project/my_codeigniter, all .htaaccess and configuration work fine if my project in http://localhost/my_codeigniter.

hope you can help me, thanks!

2
  • cannot remove index.php if … how does this problem manifest? Commented Mar 3, 2019 at 9:31
  • @greybeard cannot access any controller Commented Mar 3, 2019 at 10:29

1 Answer 1

1

You can create a .htaccess file on your project root folder. File content like this;

RewriteEngine on
RewriteCond $1 !^(index\.php|assets)
RewriteRule ^(.*)$ /your-project/index.php/$1 [L]
Sign up to request clarification or add additional context in comments.

2 Comments

work! thanks brother! -> 'RewriteRule ^(.*)$ /project/my_codeigniter/index.php/$1 [L]' i have see something like this in stackoverflow.com/a/39673870/5614176, but forget replace 'your-project' by full project path base on localhost, thanks!
Not important. Can you mark it as an answer? Thanks.

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.