Skip to content

Commit e7ea7d0

Browse files
author
Paul Robert Lloyd
committed
Suppress "www." at the beginning of URLs
1 parent c41a9d5 commit e7ea7d0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.htaccess

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
RewriteCond %{REQUEST_FILENAME} !-f
2424
RewriteCond %{REQUEST_FILENAME} !-d
2525
RewriteRule ^(.*) index.php [L]
26+
27+
# Suppress "www." at the beginning of URLs
28+
RewriteCond %{HTTPS} !=on
29+
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
30+
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
2631
</IfModule>
2732

2833

0 commit comments

Comments
 (0)