hosted by liquidweb

Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting : redirecting contents of a subdomain to antoher url

Forum Jump

redirecting contents of a subdomain to antoher url

Reply Post New Thread In Web Hosting Subscription
Send news tip View All Posts Thread Tools Search this Thread Display Modes
Web Hosting Master
Join Date: Dec 2002
Location: UK
Posts: 837

redirecting contents of a subdomain to antoher url

Hi Guys

Can anyone tell me how to redirect a subdomain and all the contents into it to another URL

for example say i have the following website

now every single file within that subdomain how do i do it so that it redirects to another location?

So say i had a file called

each time someone tries to access that somefile.html it gets directed to another URL

likewise the same thing with files in the root aswell
in other words what im saying the entire contents in public_html folder each time soemoen tries to acces a file within it it gets redirected be it images or html

Sponsored Links
Join Date: Aug 2005
Posts: 35
for a subdomain, your control panel should have some sort of "redirection" feature, were you can force a client who visits the subdomain, to be redirected to another URL, for root public_html you should place an .htaccess file in there, thats if you have apache :-P

Web Hosting Master
Join Date: Dec 2002
Location: UK
Posts: 837
Yup i got Apache running

what do i put in that .htacess file for root?


Sponsored Links
Web Hosting Master
Join Date: Dec 2001
Location: NYC
Posts: 1,902
You want mod_rewrite.

Web Hosting Master
Join Date: Dec 2002
Location: UK
Posts: 837
Hi thanks for your reply

I had a look and found this:

and there is code somewhere on that page which shows:

Redirect visitor by domain name

DESCRIPTION: In some cases the same web site is accessible by different addresses, like,, and we want to redirect it to one address.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^(.*)$$1 [R,L]

EXPLAIN: In this case the requested URL would redirected to the URL


is that the kinda thing i want? If so do i create a blank .htaccess file and post that code on? and if so where do i save it under? Public_html?

any help wud be appreicated



Related posts from
Title Type Date Posted
Bitcoin Exchange Fixes Security Issue Caused by Web-Wallet Update Web Hosting News 2014-12-09 16:06:03
Hacker Steals $83K in Bitcoins by Hijacking Traffic Directed at Large Hosting Companies Web Hosting News 2014-08-15 15:38:55
Mistakes To Avoid When Launching A New Website Design Blog 2014-01-10 10:53:50
Facebook Class Action Seeks Damages for the Alleged Interception of Private Messages Web Hosting News 2014-01-07 10:10:05
Facebook's Recently Acquired Mobile App Platform Parse Launches Web Hosting for Developers Web Hosting News 2013-05-08 10:49:17

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Log in with your username and password

Forgot Password?
WHT Host Brief Email:

We respect your privacy. We will never sell, rent, or give away your address to any outside party, ever.

Web Hosting News:
WHT Membership
WHT Membership



Welcome to

Create your username to jump into the discussion! is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.

(4 digit year)

Already a member?