Can i use RewriteRule inside Location and Files sections in Apache httpd?
Issue
- Does
RewriteRuleis permitted in<Location>and<Files>sections in Apache httpd? - When i use the simple
RewriteRuleas follows in<Location>sections it doesn't work, and when used the same inside<Directory>, it works fine. Why?
<Location "/">
RewriteEngine On
LogLevel info rewrite:trace4
RewriteRule ^/foo/(.*)$ /$1 [P,L]
</Location>
Environment
- Red Hat JBoss Web Server (JWS) 3.0.3
- Apache httpd 2.4.6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
