Re: Question: RewriteMap and context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 6, 2008 at 12:17 PM, Eric Covener <covener@xxxxxxxxx> wrote:
> On Sat, Apr 5, 2008 at 9:09 PM,  <lihao0129@xxxxxxxxx> wrote:
> > From the Apache mod_rewrite documentation, the RewriteMap should be
> >  working under both server config and virtual host. I have the
> >  following RewriteMap rules:
> >
> >     RewriteMap images txt:/path/to/img.map
> >     RewriteRule ^/images/([0-9][0-9][0-9])(.*)$
> >  /multimedias/${images:$1}/$2   [L,PT]
> >
> >  which I need to make it work on all the VirtualHosts. If I configure
> >  it on each VirtualHost, the rewritting map worked well. But if I move
> >  this to the server-configure level? the RewriteMap dont work any
> >  more?? The same situation happened in setting up RewriteRules.
>
> Working as designed I believe, see RewriteOptions
>
> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriteoptions
>
> Or use the Include directive and keep these common rules in a separate file.

So what's the best way to handle these common rules, currently I have
to write all of these common rules in each VirtualHost section..

Outside the VirtualHost container in my httpd.conf, I have tried:

RewriteOptions inherit
RewriteRule ....command rules......
.......

but it's not working.:(

BTW. I did use separate files for different VirtualHosts and 'include'
them into httpd.conf.

Many thanks,
lihao


>
> --
> Eric Covener
> covener@xxxxxxxxx
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux