0

I want to remove .php from address bar. Actually my address bar is located this site http://localhost/product/login.php. But i want show that address bar look like this format http://localhost/product/login without the ".php" extention.

Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119
Muralitharan
  • 367
  • 1
  • 2
  • 11

1 Answers1

3

Please try this in .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
Kashish Agarwal
  • 303
  • 1
  • 15