hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting : redirect a subdomain to external IP
Reply

Web Hosting Discussions on all aspects of web hosting including past experiences (both negative and positive), choosing a host, questions and answers, and other related subjects. If your service is unavailable, please click here.
Forum Jump

redirect a subdomain to external IP

Reply Post New Thread In Web Hosting Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 10-30-2008, 08:21 AM
marigwil
Guest
 
Posts: n/a
redirect a subdomain to external IP

Hi,
Is there any way to redirect a subdomain on a machine A to point to an IP adress on a second machine B.
thanks
william !

Reply With Quote


Sponsored Links
  #2  
Old 10-30-2008, 08:34 AM
InfusionHosting
Guest
 
Posts: n/a
What control panel are you using for this subdomain ?

Reply With Quote
  #3  
Old 10-30-2008, 09:00 AM
SC-Daniel SC-Daniel is online now
Corporate Member
 
Join Date: Jan 2008
Location: Jax, FL
Posts: 2,648
Edit the DNS zone for the domain and create a record like this:
subdomain IN A 192.168.1.1
That will cause all requests for that subdomain to go to the second server. Ask your host for assistance if you cannot edit the DNS zone.





__________________█ Daniel | Server Complete | [simpligreat]* integration services█ Premium Hosting Solutions --- VPS | Hybrid | Dedicated | Backups█ Now located in TWO premium datacenters --- GNAX AtlantaNAP (Atlanta, GA) | DataBank (Dallas, TX)█ Stunning seamless results that look simply great. | [simpligreat]* integration services

Reply With Quote
Sponsored Links
  #4  
Old 10-30-2008, 09:23 AM
iHubNet-Matt iHubNet-Matt is offline
Web Hosting Master
 
Join Date: Aug 2007
Posts: 6,895
You can add these lines to .htaccess file of your sub domain. RewriteEngine on
RewriteCond %{HTTP_HOST} ^test.domain.com$
RewriteRule ^(.*)$ "http\:\/\/192\.168\.1\.1" [R=301,L]
this will redirect test.domain.com to 192.168.1.1( You will have to edit your subdomain instead of test.domain.com and replace the IP with machine B IP )






__________________iHubNet Ltd - Premium Hosting Solutions 4 ALL • Solid Support • Solid Equipment • Solid Network Shared Hosting / Reseller Hosting / Managed ServerMatt A.

Reply With Quote
  #5  
Old 10-30-2008, 10:21 AM
freeflyer freeflyer is offline
Web Hosting Master
 
Join Date: Jun 2006
Location: it seems on line ;)
Posts: 923
Quote:



Originally Posted by marigwil


Hi,
Is there any way to redirect a subdomain on a machine A to point to an IP adress on a second machine B.
thanks
william !


Include this line within the .htaccess file (root html directory of your subdomain_machine):
redirect 301 <root_of_your_subdomain_location> <second_machine_IP>
sample:
redirect 301 /subdomain/ http://11.111.111.11/
it will display the new home for your subdomain, whatever you call it





__________________Gonzalo
"To venture is to risk one's life; not to venture is to lose one's reason to live"






Last edited by freeflyer : 10-30-2008 at 10:27 AM.
Reason: typo

Reply With Quote
  #6  
Old 10-30-2008, 11:09 AM
marigwil
Guest
 
Posts: n/a
ANSWER



Quote:



Originally Posted by InfusionHosting


What control panel are you using for this subdomain ?


i am using PLESK

Reply With Quote
  #7  
Old 10-30-2008, 11:12 AM
marigwil
Guest
 
Posts: n/a
Hi all, thanks, problem solved.
I have used solution from SC-Daniel with Neuf Telecom.
Thanks

Reply With Quote
  #8  
Old 10-30-2008, 11:14 AM
TWR Web Design TWR Web Design is offline
Junior Guru Wannabe
 
Join Date: Sep 2007
Posts: 40
Quote:



Originally Posted by marigwil


i am using PLESK


I don't use Plesk, so I'm not entirely sure if you can change the DNS entries from the control panel.
I suggest you contact your hosting company and request them to update the A Record for the sub-domain so that it points to the new IP address. However, I don't recommend you use the .htaccess method as suggested above.

Reply With Quote
  #9  
Old 10-30-2008, 11:17 AM
marigwil
Guest
 
Posts: n/a
Quote:



Originally Posted by JstTom


I don't use Plesk, so I'm not entirely sure if you can change the DNS entries from the control panel.
I suggest you contact your hosting company and request them to update the A Record for the sub-domain so that it points to the new IP address. However, I don't recommend you use the .htaccess method as suggested above.


Yes I will USE A entry in DNS with my hosting provider.
Thanks

Reply With Quote
  #10  
Old 10-31-2008, 01:03 AM
blessen blessen is offline
Web Hosting Master
 
Join Date: Aug 2003
Location: Gods Own Country
Posts: 850
Quote:



Originally Posted by marigwil


Hi,
Is there any way to redirect a subdomain on a machine A to point to an IP adress on a second machine B.
thanks
william !


Yes, its very simple. Just edit the DNS entry for the subdomain with the machine B's IP.





__________________
Blessen Cherian
CTO, www.bobcares.comMy 2 cent on Preventing DDOS
HeMan and the Masters of VPS

Reply With Quote
  #11  
Old 10-31-2008, 01:04 AM
MicGoogle MicGoogle is offline
Junior Guru
 
Join Date: Apr 2006
Posts: 181
I'm lovin the 1000s ways people explain this.





__________________█ HastyFree - Solutions for the Web - http://www.hastyfree.com█ Join the Revolution Today! See why we're raved!█ Tons of Scripts, 99.9% Uptime Guarantee, Active Community!

Reply With Quote
  #12  
Old 10-31-2008, 01:12 AM
freeflyer freeflyer is offline
Web Hosting Master
 
Join Date: Jun 2006
Location: it seems on line ;)
Posts: 923
Quote:



Originally Posted by blessen


Yes, its very simple. Just edit the DNS entry for the subdomain with the machine B's IP.


Is that redirecting? The subdomain would not be available under different URLs, just
under the one matching the new DNS entry.





__________________Gonzalo
"To venture is to risk one's life; not to venture is to lose one's reason to live"

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
50e60d71-40a8-4ceb-9b88-356345a799de Listing 2013-03-05 18:26:17
50d46ad4-7db4-42e5-ba39-4c2745a799bf Listing 2013-03-05 18:24:19
50d46ad3-cd68-4c75-8da2-4c1e45a799bf Listing 2013-03-05 18:24:17
50d46ad3-2118-4e13-a702-4c2245a799bf Listing 2013-03-05 18:24:18
Hackers Post 450,000 Yahoo! Voices User Login Credentials Online Web Hosting News 2012-07-12 10:38:07


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
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com 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?