Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Force WWW
My host allows you to access my site at either http://domain.com/ or http://www.domain.com/ as you would expect.
The problem is that the two differ in terms of cookies and I really hate it, because if i say by accident miss the / of the end of a URL then it automatically drops the WWW?
How can I force WWW. so say if someone went to http://domain.com/about/ it would automatically change this to http://www.domain.com/about/
THANKS> x
~ Cameron
Offline
Offline
Re: Force WWW
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
RewriteCond %{HTTP_HOST} ^simplecandy.com
RewriteRule (.*) http://www.simplecandy.com/$1 [R=301,L]
This is my code, how do I make it so it all works together :S
At the moment its now going http://www.simplecandy.com/index.php/
Last edited by driz (2008-08-19 21:44:26)
~ Cameron
Offline
Re: Force WWW
Gocom wrote:
To top of your root .httaccess file:
To the top! :)
Offline
Re: Force WWW
Ah right it’s working now :)
Quick Q though, what does this do?
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
~ Cameron
Offline
Pages: 1