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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.