[ic] Using mod_rewrite AND mod_interchange

Bryan D Gmyrek gmyrek at U.Arizona.EDU
Wed May 12 17:34:28 EDT 2004


> > I already have mod_interchange and mod_rewrite working.
> > Problem is getting them working together.  For example
> > if I have /store set up as the path for mod_interchange
> > and then want to rewrite something to it such as:
> > (in .htaccess or httpd.conf)
> > RewriteRule ^/foo/(.*)$  /store/scan/st=db/sf=title/se=$1 [PT,L]
> >
> > Then I try
> > http://www.foo.com/foo/what.html
> > I get the interchange page with error
> >
> > Sorry, the page (foo/what) was not found
> >
> > This *does* work if I use the cgi link program and the rewrite
> > rule is
> > RewriteRule ^/foo/(.*)$  /cgi-bin/store/scan/st=db/sf=title/se=$1 [PT,L]
> >
> > So I guess the short of it is how do you use rewrite rules and
> > mod_interchange together?  I've tried putting the rules in httpd.conf
> > *before* the <Location /store> lines but to no avail.
> >
> Surely, if you have <Location /store>, your RewriteRule would have to
> look more like "^/store/foo/(.*)$" instead of "^/foo/(.*)$".
>
> >
> > There are no entries in the error logs for the catalog, in the
> > man interchange dir, or the apache logs.  I figure because
> > I get the ic error page and not just 'page not found' then IC
> > must be getting the request, but not sure why it doesn't process
> > it 'normally'.
> >
> I have websites with rewrites and mod_interchange working together.
> Mostly these rewrites are to change an old URI (such as "/cgi-bin/shop")
> to a new one (such as "/") for temporary backward compatibility with
> search engine listings.  Make sure you have RewriteEngine switched on.
>
> I've not tried [PT] with mod_interchange, but I can't think of any
> reason why it'd fail.  Maybe I'll give it a try later.
Apparently this has been brought up before, see:
http://www.icdevgroup.org/pipermail/interchange-users/2002-November/029424.html
In 2002 you modified the mod_interchange code to make [PT] work ... also
noted in the changelog for mod_interchange 1.27

Now that I've got <Location /> with OrdinaryFileList working I
am back to this problem :(  Basically what I want to do is have some
rewriterules so that /cgi-bin/mystore/ will redirect to / so that all
pages in the search engines will not be 'orphaned'.  Do you remember how
you did this?

>
> Ignoring all of the above for a moment: why are you using RewriteRule
> for this anyway?  Try an ActionMap instead.
>
Thanks for the tip.  Now that I have <Location /> working this is excactly
what I want to do.

Thanks,
Bryan


More information about the interchange-users mailing list