Re: mod_rewrite problem

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

 



On 08/03/07, Israel Brewster <israel@xxxxxxxxxxxxxxxxxx> wrote:
Thanks for your response and suggestions.

On Mar 7, 2007, at 9:48 AM, Vincent Bray wrote:

> Hi, welcome to rewrite-in-htaccess pain and suffering. As you're able
> to use RewriteLog, why put rewrite rules in htaccess?

When I tried that my RewriteRules stopped working entirely :P I
suspect that was just a mis-configuration on my part, however, so
I'll keep looking.

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule in
the note 'per directory Rewrites' is important when moving rewrite
rules from .htaccess files or <Directory> blocks, to per-server
(VirtualHost, or main server) contexts. In this case, ^nagios never
matches because the per-directory prefix isn't stripped. ^/nagios is
what you need, in addition to simillar changes for the rest of your
rules.
This annoyance aside, putting rewrite rules in server context has
other advantages, mainly increased speed (regexen are compiled once at
startup and the uri->filepath translation stage can be skipped) but
also decreased confusion; rewrite in htaccess involves extra steps
beyond what seems reasonable to figure out the resulting url.


--
noodl

---------------------------------------------------------------------
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