.htaccess

Card image cap

How to hide your PHP or HTML file extension using .htaccess.

Today I will show you how to hide your PHP or HTML file extension using .htaccess.

  • PHP code:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^([^.]+)$ $1.php [NC,L]

 

  • HTML code:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

Rewr...

Read More →