Sample Header Ad - 728x90

Apache: How do I redirect all userdir user web spaces to a different server?

0 votes
1 answer
37 views
We want to move our user web spaces (eg, www.domain.invalid/~usersite) to a different server (webhomes.domain.invalid/~usersite), but we want to ensure that existing incoming links and bookmarks get redirected to the new server. My attempts at trying to get the right syntax/regexp for an Apache Redirect or RewriteRule haven't yet been successful. I essentially want to match on ^/~ followed by anything (?) and redirect it as a request to the corresponding location on the new server, including the ~username part and the rest of the request URI , where it exists. We are currently using Apache 2.4.
Asked by dave559 (451 rep)
Apr 4, 2025, 11:12 AM
Last activity: Apr 4, 2025, 01:25 PM