View Full Version : Call Domain?

02-28-2007, 04:56 AM
Hi. Is there a PHP script to call the domain name you are visiting?

Example; if you park your domain name at Sedo.com, then it will show like this: www.atboobs.com (not porn :P)

Notice how at the top it says ATBOOBS.COM - How do they do that?

The next issue is that I would be doing this within a frame, so it would need to look at the domain in the parent frame, not the current one (e.g. a user could own www.blahblahblah.com and put an iframe to my page and it would say BLAHBLAHBLAH.COM not mypage.com [the source of the frame])

02-28-2007, 02:21 PM
To redirect at the domain level like that, you need to use .htaccess.

RewriteEngine on
RewriteCond %{HTTP_HOST} (www\.)?sedo\.com$ [NC]
RewriteRule ^(.*)$ http://www.atboobs.com/$1 [R=301,L]

I can't help you with your frame question. Sorry.

p.s. - You should post questions on a different topic in a new thread. ;)