Skip to content

Instantly share code, notes, and snippets.

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