Revision 13617
Added by Aaron Marcuse-Kubitza over 10 years ago
.htaccess | ||
---|---|---|
13 | 13 |
|
14 | 14 |
SetEnvIf Request_URI ^ innermost_dir=/ |
15 | 15 |
|
16 |
# handle username-based prefix subpaths of the form "subpath@url?" |
|
17 |
# supports multiple @ and nested . : a@b.c@url? -> url?b.c.a
|
|
16 |
# handle username-based prefix subpaths of the form "subpath@url?" or "__?__&"
|
|
17 |
# supports multiple @ , nested . , & query str: a@b.c@url?k=v& -> url?b.c.a&k=v
|
|
18 | 18 |
# better than subpath.host because case is preserved and special chars allowed |
19 | 19 |
# must require trailing ? , to avoid needing login to view the page itself |
20 | 20 |
# must come before other redirects, because they lose the username |
21 |
RewriteCond %{THE_REQUEST} "\? \S+$"
|
|
21 |
RewriteCond %{THE_REQUEST} "[?&] \S+$"
|
|
22 | 22 |
RewriteRule ^ username_prefix.php [discardpath,last,noescape,qsappend] |
23 | 23 |
|
24 | 24 |
# remove www subdomain |
Also available in: Unified diff
web/.htaccess, web/username_prefix.php: username-based prefix subpaths: support query strings in addition to paths