Comment to 'UNA nginx rewrite rules'
  • Path to UNA means path to UNA in query string, for example

    Please replace the following in you nginx config

        location / {
          index index.html index.htm index.php;
     
          rewrite "^/var/www/tavrn.social/page/(.*)$" /var/www/tavrn.social//page.php?i=$1 last;
          rewrite "^/var/www/tavrn.social/m/(.*)$" /var/www/tavrn.social/modules/index.php?r=$1 last;
          rewrite "^/var/www/tavrn.social/s/([a-zA-Z0-9_]+)/([a-zA-Z0-9\.]+)" /var/www/tavrn.social/storage.php?o=$1&f=$2 last;
     
          if (!-e $request_filename ) {
            rewrite ^/var/www/tavrn.social/(.+)/var/www/tavrn.social/r.php?_q=$1 last;
            break;
          }
         }
     
        # deny access to hidden files
        location ~ /var/www/tavrn.social/(\.ht|\.git) {
          deny all;
        }
     
        # deny access to specific folders
        location ~ ^/var/www/tavrn.social/(cache/|storage/|logs/|plugins/|tmp/) {
          deny all;
        }
    

    with the following

        location / {
          index index.html index.htm index.php;
     
          rewrite "^/page/(.*)$" /page.php?i=$1 last;
          rewrite "^/m/(.*)$" /modules/index.php?r=$1 last;
          rewrite "^/s/([a-zA-Z0-9_]+)/([a-zA-Z0-9\.]+)" /storage.php?o=$1&f=$2 last;
     
          if (!-e $request_filename) {
            rewrite ^/(.+)/r.php?_q=$1 last;
            break;
          }
         }
     
        # deny access to hidden files
        location ~ /(\.ht|\.git) {
          deny all;
        }
     
        # deny access to specific folders
        location ~ ^/(cache/|storage/|logs/|plugins/|tmp/) {
          deny all;
        }