Estoy tratando de reescribir una base de datos para que funcione desde una declaración del directorio htaccess a un servidor nginx en centOS7. Sabemos que funciona desde el argumento php de la base de datos como /UBA/reports/index.php?type=b&name=league_100_home
¿Podría alguien ayudarnos a traducir lo que debe agregarse en el archivo de configuración de nginx para domain.ssl.conf para que esto funcione correctamente? La carpeta donde viven los archivos está en /public/UBA/reports/
Probamos un htaccess al sitio del convertidor nginx sin éxito y el archivo conf no pudo reiniciarse con nginx. El siguiente código son las reglas de reescritura en el directorio /public/UBA/reports/ que hace que el servidor apache reescriba y funcione. ¡Gracias!
La ruta URL de los informes proviene de un archivo dbconfig.php con $reports_url_path = "/UBA/reports/";
RewriteOptions MaxRedirects=1 RewriteRule ^leagues/(.*)\.html$ '[%REPORTS_URL_PATH]index.php?type=b&name=$1' [L] RewriteRule ^box_scores/(.*)\.html$ '[%REPORTS_URL_PATH]index.php?type=e&name=$1' [L] RewriteRule ^coaches/(.*)\.html$ '[%REPORTS_URL_PATH]index.php?type=g&name=$1' [L] RewriteRule ^game_logs/(.*)\.html$ '[%REPORTS_URL_PATH]index.php?type=f&name=$1' [L] RewriteRule ^history/(.*)\.html$ '[%REPORTS_URL_PATH]index.php?type=h&name=$1' [L] RewriteRule ^leagues/(.*)\.html$ '[%REPORTS_URL_PATH]index.php?type=b&name=$1' [L] RewriteRule ^players/(.*)\.html$ '[%REPORTS_URL_PATH]index.php?type=d&name=$1' [L] RewriteRule ^teams/(.*)\.html$ '[%REPORTS_URL_PATH]index.php?type=c&name=$1' [L]Resolvimos esto después de prueba y error con el siguiente código:
rewrite ^/UBA/reports/box_scores/(.*)\.html$ /UBA/reports/index.php?type=e&name=$1 last; rewrite ^/UBA/reports/coaches/(.*)\.html$ /UBA/reports/index.php?type=g&name=$1 last; rewrite ^/UBA/reports/game_logs/(.*)\.html$ /UBA/reports/index.php?type=f&name=$1 last; rewrite ^/UBA/reports/history/(.*)\.html$ /UBA/reports/index.php?type=h&name=$1 last; rewrite ^/UBA/reports/players/(.*)\.html$ /UBA/reports/index.php?type=d&name=$1 last; rewrite ^/UBA/reports/teams/(.*)\.html$ /UBA/reports/index.php?type=c&name=$1 last;