[ic] URL Rewrite for Subdomains - Help?

Thomas J.M. Burton tom at globalfocusdm.com
Fri Mar 25 17:25:53 UTC 2011


Hi everyone,

I'm in the process of setting up a landing page system for one of the IC 
catalogs we run and am wondering if anyone might be able to give me some 
advice on creating rewrite rules to route subdomains to the proper 
landing page.

Firstly, I'm running this catalog using the Apache rewrite rules that 
take /cgi-bin/catname out of the URL. I have those set up as follows:

   RewriteEngine   On
   RewriteRule ^$ /cgi-bin/catname/index.html [PT,L]
   RewriteRule ^/$ /cgi-bin/catname/index.html [PT,L]
   RewriteRule ^/cgi-bin/.* - [PT,L]
   RewriteRule ^/images/.* - [PT,L]
   RewriteRule ^/interchange-5/.* - [PT,L]
   RewriteRule ^/(.*) /cgi-bin/catname/$1 [PT,L]

Secondly, I have wildcard domains configured in my DNS and Apache 
configuration for the domain.

Thirdly, the landing pages are already available via URLs such as 
http://www.mydomain.com/foopage

What I'd like to do is take a request for a subdomain and route it like so:

     Request: http://foopage.mydomain.com
     Serves up: http://www.mydomain.com/foopage

... and it would need to keep the http://foo.mydomain.com URL in the 
browser's address bar. Basically, I want a seamless method of serving up 
those landing pages at their subdomains that doesn't send any redirect 
headers.

I hope this makes sense and that someone out there can help.

Thanks in advance,
Tom



-- 
_______________________________
Global Focus Digital Media, LLC
www.globalfocusdm.com



!DSPAM:4d8cd01f252386029337484!





More information about the interchange-users mailing list