21301 Posts in 5735 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 198 Views |
-
[SOLVED] SS3 - 301 redirect problem

9 January 2013 at 8:51am Last edited: 9 January 2013 8:54am
Hi there,
I have a website that i am doing SEO on and i need both www.diveschoolcapetown.co.za and http://diveschoolcapetown.co.za to point to http://www.diveschoolcapetown.co.za
I have changed the .htaccess file as follows:
<IfModule mod_rewrite.c>
.....
RewriteCond %{HTTP_HOST} ^diveschoolcapetown.co.za[nc]
RewriteRule ^(.*)$ http://www.diveschoolcapetown.co.za/$1 [r=301,nc]
.....
</IfModule>The problem that i have is that it does not redirect correctly.
When i type in 'http://www.diveschoolcapetown.co.za' the url gets displayed as --- 'http://www.diveschoolcapetown.co.za/?url=/'If i type in a nested url eg 'http://www.diveschoolcapetown.co.za/contactus' it does not redirect at all.
Please help
-
Re: [SOLVED] SS3 - 301 redirect problem

9 January 2013 at 10:09am
You can just add Director::forceWWW(); to your mysite/_config.php (I only use 2.4 but i think it will work in ss3 also)
Or if you want to use htaccess, use the below right after RewriteBase /
RewriteCond %{HTTP_HOST} !^(www\.)diveschoolcapetown\.co\.za$ [NC]
RewriteRule ^(.*)$ http://www.diveschoolcapetown.co.za/$1 [L,R=301]Hope it helps
| 198 Views | ||
|
Page:
1
|
Go to Top |

