Redirect HTTP to HTTPS in .htaccess
.htaccess rules that permanently redirect every HTTP request to HTTPS.
Adds .htaccess rules to permanently redirect all HTTP requests to HTTPS. Uses mod_rewrite with HTTPS environment variable check - compatible with reverse proxies that set X-Forwarded-Proto.
When you need this: After enabling SSL to enforce HTTPS-only access across all pages.
Command
5 views
0 copies
Related in this category
Log in to save
Free account. Save snippets into your own collections.