Multiple redirects / rewrites within one VirtualHost group

Posted by Benjamin Dell on Server Fault See other posts from Server Fault or by Benjamin Dell
Published on 2010-06-15T19:41:43Z Indexed on 2010/06/15 19:53 UTC
Read the original article Hit count: 236

Filed under:
|
|

Hi, I have a client that now wants to point a couple of dozen urls to their main site. I have added them as serveralias's in the sites apache config file... so now all of these urls point to the primary one... excellent.

The problem i have is that if ANY of these alias's are accessed at the root (i.e. www.domain.com rather than www.domain.com/some-page/) then i need to redirect them to a specific page within the site (i.e. anyone accessing domain.com might need to be sent to domain.com/special-landing-page/). However, any visit to anything other than the landing page should just continue as normal without any re-directs.

I've been battling with this for a few hours and can't seem to find the best solution. Does anyone have any suggestions?

© Server Fault or respective owner

Related posts about apache

Related posts about apache2