What I need to do is, to achieve redirect
in NGINX configuration.
Can't figure out proper regex. BTW, url might be with http/https.
Maybe with this:
<?php $murl = "domain.net/detail.php/?name=tRpPRU9dqVQ" echo preg_replace ("(https?://domain\.net/detail)\.php(/\?name=[a-zA-Z0-9]*)", "\0\1", $myurl) ?>
How do you want to achieve redirect ? Do you want to do it using PHP ?
You can use this redirect rule in your nginx configuration.
rewrite ^/detail.php/(.*)$ /detail/$1 redirect;
You can replace the
redirect word at the end with
permanent for a
301 permanent redirect code. You can find more details about this on their documentation.