Revision 13668
Added by Aaron Marcuse-Kubitza over 10 years ago
username_prefix.php | ||
---|---|---|
8 | 8 |
} |
9 | 9 |
else |
10 | 10 |
{ |
11 |
$dest = $_SERVER["SCRIPT_URL"]."?"; |
|
11 |
$dest = preg_replace('!\b/!', "./", $_SERVER["SCRIPT_URI"])."?"; |
|
12 |
# append trailing . to host to prevent infinite redirect loop |
|
12 | 13 |
if ($_SERVER["PHP_AUTH_USER"] !== "") # prepend to query string |
13 | 14 |
$dest .= "."/*force dotpath*/.user2path($_SERVER["PHP_AUTH_USER"]); |
14 | 15 |
$dest .= $_SERVER["QUERY_STRING"]; |
Also available in: Unified diff
web/.htaccess, username_prefix.php: username-based prefix subpaths: don't require the // at the end , to avoid clutter. IMPORTANT: in order to access the home page after visiting a URL with a username, you must now append "." to the host ("vegpath.org.") (other pages are not affected by this problem). since vegpath.org is a URL shortener, this is a worthwhile tradeoff to avoid needing the // suffixes everywhere.