Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
Please Help - Redirect mydomain.com to www.mydomain.com
Old 07-07-2009, 01:20 AM Please Help - Redirect mydomain.com to www.mydomain.com
Junior Talker

Posts: 1
Name: Raj
Trades: 0
Hi,

My current site adhysteria is opening from http://www.adhysteria.com
But from http://adhysteria.com its going to cpanel.

Want http://adhysteria.com also to open www.adhysteria.com

Current .htaccess is

RewriteCond %{HTTP_HOST} ^.adhysteria\.com$
RewriteRule ^(.*) http://www.adhysteria.com/$1 [L,R=301]

Above is not working also how long will it take for adhysteria.com to point to www.adhsyteria.com after changes.

Please suggest if someting completely new has to be done.

Regards
Rajiv
rajivv is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-07-2009, 06:42 AM Re: Please Help - Redirect mydomain.com to www.mydomain.com
damien_ls's Avatar
Layershift

Posts: 474
Name: Damien
Trades: 0
Your problem cannot be solved via .htaccess. The issue is with what's configured within Apache because it isn't "listening" for adhysteria.com, only www.adhysteria.com. This means that when it receives a request for adhysteria.com it just displays the default site on IP 216.245.199.234, which in your case is cpanel.

You should check with your host about how to correct this.

FWIW the .htaccess code you have looks correct to me, but it will only redirect to www if requests for adhysteria.com and www.adhysteria.com reach the same place (i.e. if the server attempts to load the same content for each one via a serveralias for example).
__________________

Please login or register to view this content. Registration is FREE
:: DDS & Dedicated, UK & USA-based
Please login or register to view this content. Registration is FREE
, Reseller & Shared Hosting
Experienced Parallels Platinum Partners (Plesk since 2001, Virtuozzo since 2003)
damien_ls is offline
Reply With Quote
View Public Profile
 
Old 07-08-2009, 07:51 PM Re: Please Help - Redirect mydomain.com to www.mydomain.com
andrei155's Avatar
CEO of BLD Hosting

Posts: 1,514
Name: Andrei
Location: Canada
Trades: 6
I believe it should look like this:

Code:
rewritecond %{http_host} ^adhysteria.com [nc]
rewriterule ^(.*)$ http://www.adhysteria.com/$1 [r=301,nc]
Damien, however, is correct about the cPanel Issue. The above code will simply rewrite all requests ( adhysteria.com, www.adhysteria.com, http://adhysteria.com, http://www.adhysteria.com) to http://www.adhysteria.com.
__________________
No Overselling Guarantee
Now Includes a Free Domain
BLD Hosting -
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE

Last edited by andrei155; 07-08-2009 at 07:54 PM..
andrei155 is offline
Reply With Quote
View Public Profile Visit andrei155's homepage!
 
Reply     « Reply to Please Help - Redirect mydomain.com to www.mydomain.com
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11713 seconds with 12 queries