Re: [users@httpd] mod_rewrite problem

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

 



Tezyn Drasdin wrote:
RewriteRule ^*.(php|cgi|rb|htm|html)? |(_(REQUEST|SERVER|COOKIE)[*]$ YouGo'
n2Jail.html

Is this the correct syntax to get my desired result?

The QueryString does not match against the pattern of the RewriteRule, you must use a condition in order to check the QueryString like

RewriteEngine on
RewriteCond %{QUERY_STRING} (_(REQUEST|SERVER|COOKIE)
RewriteRule \.(php|cgi|rb|htm|html)$ - [F]

The only way that I have seen RewriteRule deployed is in between
<VirtualHost> elements.  Is this the only way to do it, or is there a way
that you can do it server wide?

You might include it from an external file into each virtualhost or place it into the main server config section while using in a <virtualhost...>

RewriteEngine on
RewriteOptions inherit

otherwise the rules aren't being processed because the virtualhost overrides the main server config section.

Consider the third-party module mod_security instead of mod_rewrite as well.

--
Robert

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