0

I am having a problem that I want to remove index.php from my url My url is like http://localhost/Houseboat/index.php/home/about is want to change into http://localhost/Houseboat/home/about

please help me to solve my problem

3
  • I put this code RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] Commented Jun 5, 2015 at 11:38
  • I put this code #RewriteEngine On #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule ^(.*)$ index.php/$1 [L] Commented Jun 8, 2015 at 3:53
  • But its not working..the error is that the url is not in the server when i removed index.php Commented Jun 8, 2015 at 3:54

1 Answer 1

1

First you need to access your .htaccess file it should be in public_html or a folder within that. If it's not you need to create it then copy and paste the following code into that:

RewriteEngine On
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

Hope this helps

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.