-2

Can anyone please help me. I have revamped the website from wordpress to php. And now all the urls are with .php extension. I want to redirect the earlier website pages without any extension to .php extension. Please suggest some methods to implement this.

  • 4
    Possible duplicate of [How to remove file extension from website address?](http://stackoverflow.com/questions/6534904/how-to-remove-file-extension-from-website-address) – TIGER Dec 16 '16 at 09:56
  • Possible duplicate of > http://stackoverflow.com/questions/6605184/how-to-redirect-all-my-urls-with-no-extension-to-end-with-php – Vishal T Dec 16 '16 at 09:59
  • check this answer, http://stackoverflow.com/a/6608124/5019802 it might help you. – Raunak Gupta Dec 16 '16 at 10:30

1 Answers1

1

make .htaccess file and put that code and place it on the root folder RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^.]+)$ $1.php [NC,L]

Azad khan
  • 79
  • 7