W3C home > Mailing lists > Public > uri@w3.org > January 2001

Re: Generic Support for New URI Schemes with Apache?

From: Rob Cameron <cameron@cs.sfu.ca>
Date: Wed, 24 Jan 2001 07:07:53 -0800 (PST)
Message-Id: <200101241507.HAA18922@orpheus.cs.sfu.ca>
To: asgilman@iamdigex.net, uri@w3.org
Cc: gis-wg@gridforum.org
Thanks for the lead on service-locator services.  That looks
interesting.

We've now implemented the error recovery for the bibp scheme
at usin.org.  Use any JavaScript-disabled browser and click on
a bibp link at the usin.org site to see it in operation.
For our set up, we use the following apache RewriteRule
RewriteRule /bibp:(.*)$ /bibp/bibp_recovery.php?$1                              

Because the regexp is not anchored with "^" this will match
incoming URLs that were formed relative to any base URL on the
site.

However, that behaviour (while fine for us) would be too
aggressive for generic application (e.g., replacing /bibp:
with /[a-zA-Z][-.+a-zA-Z0-9]*:  to match arbitrary schemes).

What I think I really want is something like:

RewriteRule "^${HTTP_REFERER_BASE}/([a-zA-Z][-.+a-zA-Z0-9]*:.*)$" /fix.php?$1
where perl style interpretation of the invented variable for
the referer base is used.

I don't know how to do this interpolation with the current
Apache mod_rewrite, but it strikes me that it may have other
applications as well.
Received on Wednesday, 24 January 2001 10:08:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:02 UTC