Current location: Hot Scripts Forums » Programming Languages » PHP » Redirect subdomain to ip with php?


Redirect subdomain to ip with php?

Reply
  #1 (permalink)  
Old 07-01-06, 06:27 PM
NabZ NabZ is offline
Newbie Coder
 
Join Date: Nov 2005
Posts: 87
Thanks: 0
Thanked 1 Time in 1 Post
Redirect subdomain to ip with php?

Hey,
does anyone know if it is possible to redirect a subdomain directly to an ip address? and how exactly is it done?
Reply With Quote
  #2 (permalink)  
Old 07-01-06, 06:52 PM
Wuiqed Wuiqed is offline
Wannabe Coder
 
Join Date: Aug 2004
Location: Sverige
Posts: 124
Thanks: 0
Thanked 0 Times in 0 Posts
You need acces to your domain's DNS record and create a new CNAME pointing to the IP. If you don't have that access, talk to your webhost.
Reply With Quote
  #3 (permalink)  
Old 07-01-06, 06:52 PM
Andy128 Andy128 is offline
Wannabe Coder
 
Join Date: Jun 2006
Posts: 239
Thanks: 0
Thanked 0 Times in 0 Posts
You could re-direct the index page of the subdomain to an IP / web-site addresses that you choose.

Put this in the head tag;

Quote:
<meta http:-equiv = "REFRESH" content = "0; URL= http://www.whateveraddressyouwant.com">
If content " 0- is left as zero, the page will change instantly, otherwise change it to the amount of seconds you wish to delay the change.

Hope that helps

Andy
Reply With Quote
  #4 (permalink)  
Old 07-02-06, 05:32 PM
NabZ NabZ is offline
Newbie Coder
 
Join Date: Nov 2005
Posts: 87
Thanks: 0
Thanked 1 Time in 1 Post
Quote:
Originally Posted by Wuiqed
You need acces to your domain's DNS record and create a new CNAME pointing to the IP. If you don't have that access, talk to your webhost.
how would a php script be capable of doing this. im looking to make somthing similar to http://no-ip.com.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and subdomain pws PHP 2 04-14-09 09:20 AM
IP Address Search Engine Using AJAX and PHP TheJohnDoe2005 General Advertisements 0 01-18-06 08:11 PM
Redirect After PHP GD Script dodotopia PHP 1 08-15-05 09:19 AM
PHP multi-dimensional array sorting issue aqw PHP 2 06-24-05 11:09 PM
php and ip address spidadesign PHP 0 05-16-05 05:05 PM


All times are GMT -5. The time now is 07:20 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.