Created
November 24, 2025 14:22
-
-
Save bugnumber9/fe6b8bc9ca5d32b3f241d77c6352df4c to your computer and use it in GitHub Desktop.
www to non-www redirection (.htaccess)
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
| RewriteCond %{HTTP_HOST} ^www\. [OR] | |
| RewriteCond %{HTTPS} off | |
| RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ | |
| RewriteRule ^ https://%1%{REQUEST_URI} [NE,L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment