<div dir="ltr"><span style="font-size:12.8px">Hello there. I want to migrate my website only on nginx. I setup everything, but have issue with my htaccess.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Here is the file:</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><div>[root@server]# cat .htaccess </div><div><IfModule mod_rewrite.c></div><div>    RewriteEngine On</div><div>    RewriteRule ^audio-(.*)\.html$ %{ENV:BASE}/audio_redirect_mask.php [L]</div><div>    RewriteRule ^s/(.*)$ %{ENV:BASE}/audio_redirect_source.php?u=$1 [L]</div><div></IfModule></div><div>[root@server]# <br></div></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Somebody to have good idea, how can I replace this htaccess and execute rewrite, without mod_php with apache or php-fpm?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Here is the source of both PHP files:</div><div style="font-size:12.8px">------------------------------------------------------------------------------------------------------------</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">[root@server]# cat audio_redirect_mask.php<br></div><div style="font-size:12.8px"><div><?php</div><div><br></div><div>if (empty($_GET['j'])) {</div><div>        $url = '/';</div><div>} else {</div><div>    $str = str_replace(array('-', '_'), array('/', '+'), $_GET['j']);</div><div>    $url = '/s/' .  base64_encode(openssl_decrypt($str, 'AES-256-CBC', 'somesecretpassword2222', 0, '1234567891011121000'));</div><div>}</div><div><br></div><div>header("location: $url", true, 302);</div></div><div style="font-size:12.8px">------------------------------------------------------------------------------------------------------------<br></div><div style="font-size:12.8px"><div><div></div></div><div><br></div><div>[root@server]# cat audio_redirect_source.php </div><div><?php</div><div><br></div><div>if ($_GET['u']) {</div><div>        header("X-Robots-Tag: noindex", true);</div><div>        header('Location: ' . base64_decode($_GET['u']) , true, 302);</div><div>} else {</div><div>        header("X-Robots-Tag: noindex", true);</div><div>        header("location: /"); </div></div><div style="font-size:12.8px">------------------------------------------------------------------------------------------------------------</div></div>