Revision 13662
Added by Aaron Marcuse-Kubitza over 10 years ago
.htaccess | ||
---|---|---|
28 | 28 |
RewriteCond %{QUERY_STRING} ^(@?)(.*)$ |
29 | 29 |
RewriteRule ^.*$ $0?%1&%2 [discardpath,noescape] |
30 | 30 |
|
31 |
# handle username-based prefix subpaths of the form "subpath@url?" or "__?@__"
|
|
31 |
# handle username-based prefix subpaths of the form "subpath@host//path"
|
|
32 | 32 |
# supports multiple @ , nested . , & query str: a@b.c@url?@d&q -> url?b.c.a.d&q |
33 | 33 |
# ( @ is effectively a placeholder for the decoded username prefix) |
34 | 34 |
# better than subpath.host because case is preserved and special chars allowed |
35 | 35 |
# must require trailing ? , to avoid needing login to view the page itself |
36 | 36 |
# must come before external redirects, because they lose the username |
37 |
RewriteCond %{THE_REQUEST} "\? \S+$" [ornext] |
|
38 |
RewriteCond %{QUERY_STRING} ^@ |
|
37 |
RewriteCond %{THE_REQUEST} "\S+ //" |
|
39 | 38 |
RewriteRule ^ username_prefix.php [discardpath,last,noescape,qsappend] |
40 | 39 |
|
41 | 40 |
# remove www subdomain |
Also available in: Unified diff
fix: web/.htaccess: username-based prefix subpaths: changed format to subpath@host//path because the trailing ? makes it look like the sentence the URL is in is a question