It is possible to use custom directories in mod_userdir configuration. That's how it is working right now. Now, I am trying convert tilde addresses to non-tilde addresses and completely disable mod_userdir.
There are some guides on the net, using RewriteMap etc. but generally they convert example.com/~cyro to cyro.example.com. In any case, I tried to make RewriteMap method work on directories and I got no result.
The guide I have found is here:
https://lopsa.org/node/677
I managed to build a script that gets in the input from stdin and echoes the output. An example is below:
Code:
$> echo cyro | /etc/local/find-a-user
/webhome2/cyro
However, I couldn't make it. It just doesn't work as expected. I couldn't understand what I am doing wrong.
Additionally, I tried some other rules like:
Code:
RewriteRule /([a-z0-9]+) /$1 [R]
The DocumentRoot I use for my domain (without the tildes) is /home/web/public_html. The above rule does not work, I think due to having no physical location like /home/web/public_html/cyro.
I have stuck at this point. Do you have any ideas?