LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 04-15-2009, 03:12 AM   #1
LaughingBoy
Member
 
Registered: May 2006
Location: Adelaide, South Australia
Distribution: Fedora 6-17 x64 / Ubuntu 10.x x64
Posts: 95

Rep: Reputation: 16
Question Apache site redirects using what rule? foo.site.com -> www.site.com/foo


Hi guys n gals. I'm trying to setup the follwing scenario:

www.site.com, foo.site.com, and bar.site.com all point to the same host. That's fine.

What I want is, under Apache, to redirect host.site.com to www.site.com/host.

ie:

foo.site.com will redirect to www.site.com/foo

and

bar.site.com will redirect to www.site.com/bar

I'm looking at using mod_alias, but I'm uncertain it will provide the functionality that I want.

Suggestions from site admins?
 
Old 04-15-2009, 03:33 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
under your host.site.com virtualhost section, just do "Redirect permanent / http://www.site.com/host"
 
Old 04-16-2009, 09:51 PM   #3
LaughingBoy
Member
 
Registered: May 2006
Location: Adelaide, South Australia
Distribution: Fedora 6-17 x64 / Ubuntu 10.x x64
Posts: 95

Original Poster
Rep: Reputation: 16
Arrow Helps a little...

Quote:
Originally Posted by acid_kewpie View Post
under your host.site.com virtualhost section, just do "Redirect permanent / http://www.site.com/host"
Cheers - that has helped, just not detailed enough.

It helped by pointing me in the right direction. Now to finalise the settings...

Thanks again,

L.B.
 
  


Reply

Tags
apache, hostname, redirect


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
Public IP's for site to site VPN prashanlk Linux - Networking 3 12-16-2007 12:19 PM
multiple site-2-site openvpn connections? licht Linux - Networking 2 07-20-2007 10:00 PM
apache2 vhost site makes default site inaccessible jyamada1 Linux - Server 4 01-17-2007 08:42 PM
apache: http redirect for any request going to www.foo.com/* psychobyte Linux - Software 1 04-11-2005 05:57 PM


All times are GMT -5. The time now is 05:53 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration