http://domain.com > http://www.domain.com problems

Using a single web hosting account to host multiple sites

http://domain.com > http://www.domain.com problems

Postby hyeteck » Sat Mar 31, 2007 1:28 pm

hey guys...i want to add a www to all links that are missing them.

i have this for my htaccess

Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]


it works well if u have domain.com/blablabla but does nothing to the main domain. If u go to http://domain.com is stays the same.

any ideas?
hyeteck
 
Posts: 2
Joined: Sat Mar 31, 2007 1:26 pm

Postby richardk » Sun Apr 01, 2007 1:50 pm

It should work fine. Have you got any other mod_rewrite? Have you cleared your browser's cache?

Does this rule redirect you to Google?
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^$ http://www.google.com/? [R,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby hyeteck » Mon Apr 02, 2007 11:44 pm

hi,

thanks...its working now. I don't know why it was not working for a while but then out of nowhere just started working. I'm guessing it was probably cached in my browser.
hyeteck
 
Posts: 2
Joined: Sat Mar 31, 2007 1:26 pm


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 33 guests

cron