mod_userdir seems to be able customize where the home folders are, but is there a way to make those available under a custom URL?
I want to provide users with a url like the following:
http://example.com/arbitrarystring/[user]
mod_userdir seems to be able customize where the home folders are, but is there a way to make those available under a custom URL?
I want to provide users with a url like the following:
http://example.com/arbitrarystring/[user]
This is entirely doable. I did just that and recorded the efforts here. This is a solution that does use mod-rewrite, but not deep wizardry. The problem we had was that when we were implementing user_dirs, The Powers That Be thought using a shift key to get at a directory was too much work and wanted a tilde-free version. That's a one character version of what you're doing.
The meat is in the RewriteRule
statements.
RewriteRule ^/somestring/([a-z0-9]+) /~$1 [R]
The problem here is that /~username
will still work. You can possibly get around that by using an internal proxy-redirect to another hidden domain name.
RewriteRule ^/somestring/(a-z0-9]+) http://othervhost.example.com/~$1 [PT]