show domain name instead of IP address in browser address ba

Using a single web hosting account to host multiple sites

show domain name instead of IP address in browser address ba

Postby bulbous » Sun Jul 05, 2009 9:07 pm

Hats off to you all for such a fantastic and helpful resource.

We have two domains on one server with one single IP address. Each domain name is registered to a directory on the server and everything works just fine except that the browser dereferences the human readable url and displays the raw IP address for both domains.

So a user typing in www.thisdomain.com gets to see the exact right stuff but he also gets to see http://123.456.78.9/index.php in the address bar and not www.thisdomain.com

Can somebody please help me understand how to get the address to display something like www.thisdomain.com or even www.thisdomain.com/index.php!

Is it a mod_rewite thing or should I be using VirtualHost?

I have been researching this for days and have read all the FAQs and many threads on this site and I do apologise if the answer is already there. I have looked and not found it yet.

Thanks in advance and congratulations once more on a great site
Regards
Bulbous (Fast and bulbous)
bulbous
 
Posts: 1
Joined: Sun Jul 05, 2009 6:31 pm
Location: Thailand

Postby richardk » Mon Jul 06, 2009 11:25 am

So a user typing in www.example.com gets to see the exact right stuff but he also gets to see http://123.456.78.9/index.php in the address bar and not www.example.com

Did you set up the redirect? Is it something you set up in your domain configuration panel?

Each domain name is registered to a directory on the server

How? What configuration have you got to do that?

Is it a mod_rewite thing or should I be using VirtualHost?

Possibly neither. If you can use <VirtualHost>s it is better than mod_rewrite (domain to directory handling is what <VirtualHost>s are designed to do).
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 16 guests

cron