0

I want to remove .php extension from all url also want to redirect user to the links without file extension, if someone input url with .php.

change this url http://localhost/xyz.com/post-add.php

to this http://localhost/xyz.com/post-add

for all file is that possible with htaccess?

3
  • This question already asked on Stackoverflow Commented Dec 10, 2015 at 10:40
  • Please do a search or even a google search before asking a question Commented Dec 10, 2015 at 10:40
  • i wanted to ask about redirecting users if someone enter post-add.php url automatically changes to post-add Commented Dec 10, 2015 at 10:48

1 Answer 1

0
 RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [QSA,L] 
Sign up to request clarification or add additional context in comments.

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.