Skip to content

Instantly share code, notes, and snippets.

Created June 3, 2020 11:53
What would you like to do?
htaccess redirect .php to .html
# Part of SEO Interview Questions -
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*).php?(.*)$ $1.html?$2 [R,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment