How to remove .php, .html, .htm extensions with .htaccess
I am unable to hide .php extension using htaccess.Can you please tell me how to hide .php extension using htaccess
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
vote_up
Thanks a lot.It’s really helpful to me.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^78\.46\.80\.117
RewriteRule (.*) http://aviancetechnologies.com/$1 [R=301,L]
RewriteRule ^([A-Za-z0-9-]+)/([0-9]+)/?$ $1.php?id=$1 [NC,L] # Handle ID requests
RewriteRule ^([^\.]+)$ $1.php [NC,L]
RewriteCond %{HTTP_HOST} ^www\.aviancetechnologies\.com$
RewriteRule ^/?$ "http\:\/\/aviancetechnologies\.com\/" [R=301,L]
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* ? [F,L]