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 15th June 2010, 16:30
dooku dooku is offline
Junior Member
 
Join Date: Jun 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default need to redirect and rewrite subdir of one site to another server

Hi,

I'm operating a website on an external hosting ("www.mydomain.tld" and "mydomain.tld" are both pointed to the external IP provided by the webhosting, the DNS server is local and fully customizable). Locally, there is another server that hosts another machine of the domain, lets name it "trouble.mydomain.tld". Recently, i been asked to, without moving the content, make a link between a new subdir on "www.mydomain.tld" and the local machine, to work like this:

www.mydomain.tld/trouble ----> trouble.mydomain.tld
___(external hosting)_______link_____(locally operated)

BUT, they need to keep the first direction ALWAYS visible to visitors, so even when the content is hosted locally at the "trouble.mydomain.tld" machine, visitors should see "trouble.mydomain.tld/index.php" (or any other content and subdirs) as "www.mydomain.tld/trouble/index.php" on their web browsers.

Is this possible? could you please give me a hint on how to achieve this?

Thanks in advance.

Last edited by dooku; 15th June 2010 at 16:32.
Reply With Quote
Sponsored Links
  #2  
Old 16th June 2010, 14:37
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
 
Default

This should give you the idea: http://httpd.apache.org/docs/2.2/rew...ite_guide.html
__________________
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
Reply

Bookmarks

Tags
redirect, rewrite

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_rewrite global ssl redirect and local rewrite not working Ben Server Operation 2 27th April 2010 20:42
Newb: How to redirect from domain.com to www.domain.com smartin Installation/Configuration 13 22nd February 2010 11:47
htacess Rewrite Question tegralens Server Operation 0 28th August 2009 20:10
Primary and Secondary nameserver move martinfst Technical 3 19th January 2007 22:33


All times are GMT +2. The time now is 22:33.


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