[BlueOnyx:24226] Re: Personal web pages in 5210R
Michael Stauber
mstauber at blueonyx.it
Fri Aug 28 13:58:18 -05 2020
Hi Ernie,
> so how do I intercept the http://FQDN/~username requests, and force them to
> redirect to a subdomain?
A mod_rewrite rule could do that. On 5209R and older the following rule
redirecs <domain.tld>/~username to where it needs to go:
AliasMatch ^/~([^/]+)(/(.*))? /home/.sites/75/site8/users/$1/web/$3
So $1 is the username and $3 the file name (if any). Based on that I'd
say something like this might work:
RewriteCond %{REQUEST_URI} ^/~([^/]+)(/(.*))? [NC]
RewriteRule (.*) http://$1\.example\.com/$3 [R=301,L]
--
With best regards
Michael Stauber
More information about the Blueonyx
mailing list