Saturday, 6 May 2017

Remove file extension from url using htaccess


Remove .php or .html or .any extension using .htaccess


RewriteEngine on

RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^([^\.]+)$ $1.php [L]

RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^([^\.]+)$ $1.html [L]








 add your extension instead of php

banner
Previous Post
Next Post

0 comments: