[ic] URL Rewrite for Subdomains - Help?

Josh Lavin josh at perusion.net
Thu Mar 31 21:52:43 UTC 2011


On 03/31/2011 04:45 PM, Thomas J.M. Burton wrote:
> I've worked out the rewrite conditions and rules to get this working,
> but now it seems I need to do something within Interchange's
> configuration to enable the wildcard subdomains to work properly with
> the catalog.
>
> I added these lines to my rewrite rules, after the rules listed in my
> first post:
>
>    RewriteCond %{HTTP_HOST} !^www.* [NC]
>    RewriteCond %{HTTP_HOST} !^secure.* [NC]
>    RewriteCond %{HTTP_HOST} ^([^\.]+)\.mydomain\.com
>    RewriteRule ^/(.*) /cgi-bin/snb/%1 [PT,L]

You probably want to use $1 as a backreference, not %1. I think the '%' 
is used when the reference is from the query string.

-- 
Josh Lavin
Perusion -- Expert Interchange Consulting    http://www.perusion.com/



More information about the interchange-users mailing list