[ic] URL Rewrite for Subdomains - Help?

Thomas J.M. Burton tom at globalfocusdm.com
Thu Mar 31 22:27:32 UTC 2011


On 3/31/2011 2:52 PM, Josh Lavin wrote:
> 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.
>

Thanks for the suggestion, but that part seems to be working fine.

The %1 references my third RewriteCond above, as intended. As I have 
things configured, $1 references what comes after the HTTP_HOST (e.g. 
for http://whatever.mydomain.com/something.html the %1 references 
"whatever" and a $1 references "/something.html").

I think there's something in the way Interchange handles things that is 
interfering.

-Tom


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



!DSPAM:4d94ffd4319599441818839!





More information about the interchange-users mailing list