test.com to mysite.com/test/

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

test.com to mysite.com/test/

Post by shiznatix »

Ok if I have the domain:

http://www.mywebsite.com

and I just registered the domain:

http://www.crazyhorse.com

but I only have 1 server. I want http://www.mywebsite.com to point to the main server but I want the url http://www.crazyhorse.com to actually be http://www.mywebsite.com/crazy/ so instead of typing that last url there in I just type in http://www.crazyhorse.com.

How do I do this?
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

For Apache you would use the <VirtualHost> directive. But for lighttpd so you would have to look at the docs for simple-vhost.
(#10850)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

I do this lots using <Virtualhost> in apache. Because the HTTP 1.1 specification says that HOST headers should be sent with a HTTP request I imagine that most HTTPd servers can do the same thing anyway since that's all that gets checked ;)
User avatar
Oren
DevNet Resident
Posts: 1640
Joined: Fri Apr 07, 2006 5:13 am
Location: Israel

Post by Oren »

I believe you can do that with your admin panel (if you have one).
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

My domain registrar offers this in their domain name management panel. They call it URL forwarding. You might be able to do what you are asking within your domain name profile.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

thanks kids, ill take a look at these solutions
Post Reply