Last active
August 17, 2020 10:07
-
-
Save kosmala007/1b4c59c6efc0d0db86b8b44f822a8d16 to your computer and use it in GitHub Desktop.
Redirect to non www and https
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] | |
RewriteRule ^(.*)$ https://%1/$1 [R=301,L] | |
RewriteCond %{HTTPS} !on | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
# Symfony redirect to public | |
# RewriteCond %{REQUEST_URI} !^public | |
# RewriteRule ^(.*)$ public/$1 [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment