LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-29-2009, 02:10 PM   #1
sencha
LQ Newbie
 
Registered: Jul 2008
Posts: 11

Rep: Reputation: 0
Apache - redirect sub-directories to different server?


Hi,

My current setup is:

old server:
www.mydomain.com main site
www.mydomain.com/subdirectories related sites from same server, different directories

I am adding an additional server that I would like to initially only use for the main site, something like this:

new server
www.mydomain.com main site
www.mydomain.com/subdirectories would be pointed back to the old server instead

What's the best way to redirect the traffic for the sites found in sub-directories on the old server?

Thanks in advance
 
Old 09-30-2009, 12:10 AM   #2
aaron.browne
LQ Newbie
 
Registered: Aug 2004
Location: Australia
Posts: 2

Rep: Reputation: 0
My first thoughts are to use mod_rewrite or something similar in Apache.

I found this link via Google. It uses something called RedirectMatch. Maybe this will help?

http://perishablepress.com/press/200...-via-htaccess/

Cheers,
Aaron
 
Old 09-30-2009, 09:53 AM   #3
windstrewn
LQ Newbie
 
Registered: Oct 2007
Location: Switzerland
Distribution: Debian, Ubuntu
Posts: 10

Rep: Reputation: 0
Arrow RedirectTemp indicates temporary character of redirection

Hi sencha

I almost agree with aaron.
Personally, I would prefer the Apache2 directive RedirectTemp, which indicates the temporary character of the redirection.

Where I work, we sometimes use
Code:
redirect permanent /path/to/local/resource URL://of/remote/resource
to link two pieces of information which are present on different servers.

By the way, the Apache2 online documentation is often a good starting point. At least, it often helps me.
If you speak German, the following site presents nice explanations of all Apache directives: http://buecher.lingoworld.de/apache2...?id=658&o=date.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Redirect Help! Jude Terror Programming 2 04-07-2009 11:47 AM
Apache 2 Redirect kmeyers Linux - Software 4 02-26-2009 07:13 AM
apache redirect mahmoud Linux - Newbie 3 01-13-2009 08:59 PM
apache link to server root from directories kg4ysy Linux - Software 1 11-26-2006 10:11 PM
Can't access non-server-root directories in Apache jenna_h Linux - Networking 13 10-29-2003 06:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration