Author Topic: Using modrewrite to hide or avoid ~  (Read 1649 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Using modrewrite to hide or avoid ~
« on: May 12, 2022, 02:38:42 PM »
Im trying to avoid to use ~ to enter in a user folder, i read about this and mod_rewrite can allow me this but im trying with differents way but any result is negative until now. creating a .htaccess and /home adding
RewriteRule ^/~([a-zA-Z0-9]+)/$ https://example.com/$1/ [R=301,L] but is not working or adding to httpd.conf is not working either.

Trying to be specific i want to avoid to ask to the user put ~ to access to a folder, i can't have a subdomain or domain per user,

hosting.example.com/user1 avoiding /~user