redirect vern.cc/~user to user.vern.cc for clearnet/tor

This commit is contained in:
root 2022-10-31 12:07:48 -04:00
parent 5f2e2e73f0
commit e989005190
1 changed files with 3 additions and 1 deletions

View File

@ -56,7 +56,9 @@ location ~ ^/(~|u/)(?<user>[\w-]+)(?<user_uri>/.*)?$ {
root /sshfs/home/$user/public_html;
index index.html index.php index.cgi index.py index.sh index.pl index.lua;
ssi on;
#rewrite ^(.*)$ $scheme://$user.$host redirect;
if ($host = "vern.cc") { rewrite ^(.*)$ $scheme://$user.$host redirect; }
if ($host = "vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion") { rewrite ^(.*)$ $scheme://$user.$host redirect; }
try_files $user_uri $user_uri/index.html $user_uri.html $user_uri/ @extensionless-php;
autoindex on;
autoindex_exact_size off;