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


Posted on 11/06/2020



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

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

website url: www.servlk.com

#shared_hosting #reseller_hosting #domain_names #serverlk #server_lk


Leave a Comment:

Naliya
Tnxx....