Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
301 redirects to direct www.
Can I implement this (bellow) on the standard textpattern .htaccess file?
I have tried just putting it underneath the standard code but doesn’t work.
—————————
If you need to redirect http://mysite.com to
http://www.mysite.com and you’ve got mod_rewrite enabled on
your server you can put this in your .htaccess file:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]
or this:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
———————
(there are also a few
redirect 301 /index.html http://www.domain.com/index.html
redirects on the this .htaccess file)
The problem is that the are x amount of inbound links to www.domain.com and x amount of inbound links to domain.com and need all inbound links to go to the www.domain.com using redirect 301?
Thanks
Last edited by oliverker (2008-09-11 21:58:21)
Offline
Offline
Re: 301 redirects to direct www.
Thanks for speedy reply, thats why I love textpattern even more, you are an excellent advocate for it.
Looks like it is working.
Offline
Pages: 1