Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 25th January 2007, 01:01
KenKnight KenKnight is offline
Senior Member
 
Join Date: Nov 2005
Posts: 137
Thanks: 0
Thanked 3 Times in 2 Posts
Default domain name routing and htaccess

Hi all,

I have question regarding the routing of domain names that are pointed to a virtual server.

Let's say I've got MyDomainA.com pointed to a virtual server along with MyDomainB.com pointed to the same virtual server. Is it possible to MyDomainB.com to redirect to a folder on that server (ie MyDomainB.com/domainb/ )?

Maybe using an htaccess file or something?

I don't have access to the Vhosts file for this server, thats why I'm trying to find alternative methods.

Thanks,
Ken
Reply With Quote
Sponsored Links
  #2  
Old 25th January 2007, 20:28
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Take a look here: http://www.stevenhargrove.com/redirect-web-pages/
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 26th January 2007, 03:24
KenKnight KenKnight is offline
Senior Member
 
Join Date: Nov 2005
Posts: 137
Thanks: 0
Thanked 3 Times in 2 Posts
 
Default

Thanks,

I've used php for header / location redirects for a long time, but didn't even think about just writing a main index.php with the header code to redirect based on $_SERVER["HOST"] variable.

Works like a champ.

Cheers!
Ken
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 21:16.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.