Estoy tratando de mover mi servidor a Nginx con fines de prueba. Sin embargo, cuando transfiero mis códigos htaccess al archivo conf, aparece el error 404. ¿Cómo puedo hacer que los códigos a continuación sean compatibles con la reescritura de Nginx?
RewriteEngine on RewriteRule ^firmaekle\.html$ /firmaekle.php [L,QSA,R=301] RewriteRule ^/d/([^/]*).([^/]*)\.html$ /index.php?site=$1&site2=$2 [L,QSA,R=301] RewriteRule ^u/([^/]*)([^/]*)\.html$ /uzgun.php?site=$1&site2=$2 [L,QSA,R=301] RewriteRule ^y/([^/]*)([^/]*)\.html$ /yonlendir.php?firma=$1&uzanti=$2 [L,QSA,R=301] RewriteRule ^ye/([^/]*)([^/]*)\.html$ /yonlendir2.php?firma=$1&uzanti=$2 [L,QSA,R=301]puedes hacerlo así
server { server_name example.com; rewrite ^/firmaekle\.html$ /firmaekle.php permanent; rewrite ^//d/([^/]*).([^/]*)\.html$ /index.php?site=$1&site2=$2 permanent; rewrite ^/u/([^/]*)([^/]*)\.html$ /uzgun.php?site=$1&site2=$2 permanent; rewrite ^/y/([^/]*)([^/]*)\.html$ /yonlendir.php?firma=$1&uzanti=$2 permanent; rewrite ^/ye/([^/]*)([^/]*)\.html$ /yonlendir2.php?firma=$1&uzanti=$2 permanent; }