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.
Asked
Active
Viewed 734 times
0
-
You can use `.htaccess` file [link](https://www.youtube.com/watch?v=1pbAV6AU99I) – Amr Aly Feb 22 '17 at 12:50
-
i don't know about .htaccess file. can you please explain that? – Muralitharan Feb 22 '17 at 12:52
1 Answers
3
Please try this in .htaccess file:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

Kashish Agarwal
- 303
- 1
- 15