Return to Snippet

Revision: 70302
at January 9, 2016 03:38 by jefferis


Initial Code
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]

RewriteRule ^(.*)\.htm /$1.php [R=301,L]
RewriteRule ^(.*)\.html /$1.php [R=301,L]

Initial URL


Initial Description
This rewrite will not work on WordPress.  It forces .htm and .html files that no longer exist to go to the new .php versions of the pages.

Initial Title
Force Rewrite for https and .html to .php in htaccess

Initial Tags
php, html, htaccess

Initial Language
Apache