Skip to content

Commit 1b8911f

Browse files
Merge pull request #6 from fortytwostudio/master
Redirect Fix
2 parents 2fdf671 + 2f6c2f6 commit 1b8911f

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

public/.htaccess

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,20 @@
11
<IfModule mod_rewrite.c>
22
RewriteEngine On
33

4+
# Force www
5+
# RewriteCond %{HTTP_HOST} ^websitedomain.com [NC]
6+
# RewriteRule ^(.*)$ https://www.websitedomain.com/$1 [L,R=301,NC]
7+
8+
# Redirect www to non www
9+
# RewriteCond %{HTTP_HOST} ^www.websitedomain.com [NC]
10+
# RewriteRule ^(.*)$ https://websitedomain.com/$1 [L,R=301]
11+
412
# Send would-be 404 requests to Craft
513
RewriteCond %{REQUEST_FILENAME} !-f
614
RewriteCond %{REQUEST_FILENAME} !-d
715
RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
816
RewriteRule (.+) index.php?p=$1 [QSA,L]
917

10-
# Force www
11-
# RewriteCond %{SERVER_PORT} ^443$
12-
# RewriteCond %{HTTP_HOST} ^vsa.org.uk$
13-
# RewriteRule (.*) https://www.websitedomain.com/$1 [R=301,L]
14-
15-
# Redirect www to non www
16-
# RewriteCond %{HTTP_HOST} ^www.thetechforce.co.uk [NC]
17-
# RewriteRule ^(.*)$ http://www.websitedomain.com/$1 [L,R=301]
18-
1918
# Remove trailing slash from URL
2019
# RewriteCond %{REQUEST_FILENAME} !-d
2120
# RewriteCond %{REQUEST_URI} (.+)/$

0 commit comments

Comments
 (0)