[Gllug] Regular expressions and mod_rewrite

Simon Perry gllug at si-designs.co.uk
Tue Jul 13 14:36:53 UTC 2004


Richard Jones wrote:

>On Tue, Jul 13, 2004 at 02:57:16PM +0100, Simon Perry wrote:
>  
>
>>RewriteRule ^dir/(\w+)$ /re_engine/script.php?var1=$1
>>
>>Anyone see my glaring error?
>>    
>>
>
>RewriteRule ^/dir/(\w+)$ /re_engine/script.php?var1=$1
>             ^^ NB.
>
>  
>
Rich,

The problem isn't a missing leading '/' as dir is in the root directory 
and I have specified 'RewriteBase /' the other example using ([a-z]+) 
also works fine without it.
The installed version of Apache is 1.3.31 but I don't know what version 
of PCRE that it uses.

Thanks

Simon

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list