[ic] URL Rewrite for Subdomains - Help?

Gert van der Spoel gert at 3edge.com
Fri Apr 1 06:55:32 UTC 2011

> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org [mailto:interchange-users-
> bounces at icdevgroup.org] On Behalf Of Thomas J.M. Burton
> Sent: vrijdag 1 april 2011 1:28
> To: interchange-users at icdevgroup.org
> Subject: Re: [ic] URL Rewrite for Subdomains - Help?
> 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.

But suppose you get it working to actually show 'something.html' with the
above and on that page you'd click on 'something_else.html', you'd expect
your URL to stay
http://something.mydomain.com/cgi-bin/snb/something_else.html ? Because if I
see correctly that would not be happening with the above, regardless of IC
showing anything now or not.

Do you by any chance have something in your catalog that redirects to the
homepage when it gets a 'file not found' or something? Some special action
to catches certain URLs? 

Maybe you need to look at ActionMap and see if that is something you might
be able to use:



More information about the interchange-users mailing list