Revision 8448
Added by Aaron Marcuse-Kubitza over 11 years ago
.htaccess | ||
---|---|---|
4 | 4 |
|
5 | 5 |
SetEnvIf Request_URI ^ innermost_dir=schema |
6 | 6 |
|
7 |
# parse dotpath in the query string |
|
8 |
RewriteCond %{QUERY_STRING} ^(?!&).+$ |
|
9 |
RewriteCond %{REQUEST_URI} ^(.*?)(?:/index(?:\.\w+)?)?$ |
|
10 |
RewriteRule ^.*$ /dotpath%1 [discardpath,noescape,last] |
|
11 |
|
|
12 |
# don't rewrite existing paths |
|
13 |
RewriteCond %{REQUEST_FILENAME} -d [ornext] |
|
14 |
RewriteCond %{REQUEST_FILENAME} -f |
|
15 |
RewriteRule ^(?!/).+$ - [discardpath,noescape,last] |
|
16 |
|
|
17 |
# handle DirectoryIndex subrequests |
|
18 |
RewriteRule ^index$() $1 [discardpath,noescape] |
|
19 |
|
|
20 | 7 |
# dir without trailing / is provided as an absolute filesystem path |
21 | 8 |
RewriteCond %{ENV:innermost_dir} =schema |
22 | 9 |
RewriteCond $0 ^/ [ornext] |
Also available in: Unified diff
web/**/.htaccess: Removed preprocessing commands that need to run for every dir, because these are now inherited from the outermost .htaccess using InheritBefore. This allows the inner .htaccess files to focus just on the fallback rewrites, without needing lots of boilerplate code (except for the obligatory RewriteEngine/RewriteOptions/SetEnvIf preamble).