Re: tricky mod_rewrite

From: Godmar Back <godmar_at_nyob>
Date: Wed, 1 Jul 2009 09:20:00 -0400
To: CODE4LIB_at_LISTSERV.ND.EDU
On Wed, Jul 1, 2009 at 9:13 AM, Peter Kiraly <pkiraly_at_tesuji.eu> wrote:

> From: "Godmar Back" <godmar_at_GMAIL.COM>
>
>> is it possible to write this without hardwiring the RewriteBase in it?  So
>> that it can be used, for instance, in an .htaccess file from within any
>> /path?
>>
>
> Yes, you can put it into a .htaccess file, and the URL rewrite will
> apply on that directory only.
>

You misunderstood the question; let me rephrase it:

Can I write a .htaccess file without specifying the path where the script
will be located in RewriteBase?
For instance, consider
http://code.google.com/p/tictoclookup/source/browse/trunk/standalone/.htaccess
Here, anybody who wishes to use this code has to adapt the .htaccess file to
their path and change the "RewriteBase" entry.

Is it possible to write a .htaccess file that works *no matter* where it is
located, entirely based on where it is located relative to the Apache root
or an Apache directory?

 - Godmar
Received on Wed Jul 01 2009 - 09:20:06 EDT