Jump to content

[SOLVED] Using info after domain in address bar


Recommended Posts

Hello.

 

I'm not sure how to go about this but I am wondering how to use a peice of info (a domain) from the address bar. To explain I will use the example of domaintools.com.

When you put an address into the text box (in this example google.com) and click submit the address turns to:

http://whois.domaintools.com/google.com

 

I am just wondering how you are able to a) load the page even with that domain at the end b) Get that domain as a variable to use from the domain.

 

Thanks for any advice/code.

 

(P.s. I am not creating a whois site lol)

Actually, I've found some more stuff i've read up on. Would it be more along these lines:

 

RewriteEngine On

RewriteRule ^([a-zA-Z0-9_-]+)$ domaincheck.php?domain=$1

RewriteRule ^([a-zA-Z0-9_-]+)/$ domaincheck.php?domain=$1

 

Thanks for any advice ;)

Hello.

 

I have this rewrite code now:

 

RewriteEngine On
RewriteRule ^(.+)$ index.php?do=$1
RewriteRule ^(.+)/$ index.php?do=$1

 

The 'do' variable holds a domain name. So it would be something like:

http://mydomain.com/domain.com

 

So domain.com is what I am after.

 

It goes to index.php ok, no problems there. BUT when i try to get the 'do' variable it says it's 'index.php'.

 

Any ideas?

 

Thanks.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.