Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
URL Rewrite
RewriteEngine On
RewriteCond %{HTTP_HOST} ^simplecandy.com
RewriteRule (.*) http://www.simplecandy.com/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
I’m using this at the moment to make all queries at my site HAVE the WWW beforehand.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
This is slightly different to my original code, as it adds a \ and a $ [NC]
What does this offer over my original code? Thanks yet again. x
Last edited by driz (2008-09-18 20:19:25)
~ Cameron
Offline
#2 2008-09-18 20:51:31
- TheEric
- Plugin Author
- From: Wyoming
- Registered: 2004-09-17
- Posts: 566
Re: URL Rewrite
http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
Offline
Pages: 1