Hi,
I have a problem with redirecting mysite
from http://mysite.com to
http://www.mysite.com. I did it using CPanel, it did not work at all.
I have 4 domain names pointing to the same site mysite.com. mysite.com is promary domain.
I tried to redirect using .htaccess file. Before it looked like this:
RewriteEngine on
# Use PHP5 Single php.ini as default
AddHandler application/x-httpd-php5s .php
RewriteCond %{HTTP_HOST} ^otherproducts.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.otherproducts.com$
RewriteRule ^/?$ "http\:\/\/mysite\.com" [R=302,L]
RewriteCond %{HTTP_HOST} ^otherurl.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.otherurl.com$
RewriteRule ^/?$ "http\:\/\/mysite\.com" [R=302,L]
RewriteCond %{HTTP_HOST} ^otherurltest.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.otherurltest.com$
RewriteRule ^/?$ "http\:\/\/mysite\.com" [R=302,L]
and after I changed it, it looked like this:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.mysite.com$ [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]
And it worked but just for few hours. Today,trying to acces my site, I got
blank page and changed .htaccess back
again.
So the problem is still there. maybe someone knows how to solve it?


Reply With Quote
