Skip to content

Instantly share code, notes, and snippets.

@msanjaypandit
Last active March 7, 2018 09:28
Show Gist options
  • Save msanjaypandit/3f42d77637e9831fae302ddb23310ed5 to your computer and use it in GitHub Desktop.
Save msanjaypandit/3f42d77637e9831fae302ddb23310ed5 to your computer and use it in GitHub Desktop.
[www and https Redirection] Redirect all files to https url and www domain name #www #htaccess

Redirection to https file

RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Redirection to https and www page

RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment