Skip to content

Commit 62c3202

Browse files
committed
Update .htacces to redirect www to non-www.
1 parent 125214f commit 62c3202

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.htaccess

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1+
# www to non-www
2+
RewriteEngine On
3+
RewriteBase /
4+
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
5+
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
6+
7+
# Handle deep links
18
RewriteEngine on
29
RewriteCond %{REQUEST_FILENAME} !-d
310
RewriteCond %{REQUEST_FILENAME} !-f
411
RewriteRule . / [L]
512
RewriteRule (.+)\.md /
613

14+
# Font handling
715
AddType 'application/x-font-woff' .woff
816

917
# HTTPS to HTTP
@@ -12,6 +20,6 @@ RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
1220

1321
# BEGIN GZIP
1422
<ifmodule mod_deflate.c>
15-
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript application/x-font-woff application/octet-stream
23+
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/json application/javascript application/x-font-woff application/octet-stream
1624
</ifmodule>
1725
# END GZIP

0 commit comments

Comments
 (0)