Below block working file http://192.168.112.132/sess454/wordpress
If index.php file just have echo "index";
If there actual wordpress files then it redirect to http://192.168.112.132/wordpress
But I want to keep session token in url http://192.168.112.132/sess454/wordpress
location ~ ^/sess([a-z0-9]+)/(wordpress)(.*)?\.php$ {
root /usr/local/nginx;
include fastcgi.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
if ($uri ~ "^/sess([a-z0-9]+)/(wordpress)") {
rewrite ^/sess([a-z0-9]+)/wordpress /wordpress/$2;
}
if ($uri ~ "^/sess([a-z0-9]+)/(phpmyadmin)") {
rewrite ^/sess([a-z0-9]+)/phpmyadmin /phpmyadmin/$2;
}
}
If index.php file just have echo "index";
If there actual wordpress files then it redirect to http://192.168.112.132/wordpress
But I want to keep session token in url http://192.168.112.132/sess454/wordpress
location ~ ^/sess([a-z0-9]+)/(wordpress)(.*)?\.php$ {
root /usr/local/nginx;
include fastcgi.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
if ($uri ~ "^/sess([a-z0-9]+)/(wordpress)") {
rewrite ^/sess([a-z0-9]+)/wordpress /wordpress/$2;
}
if ($uri ~ "^/sess([a-z0-9]+)/(phpmyadmin)") {
rewrite ^/sess([a-z0-9]+)/phpmyadmin /phpmyadmin/$2;
}
}