Hi guys, i'm trying to translate htaccess rules to Ngingx, using winginx.com/en/htaccess. I'm used to set nginx directives inside each website Settings > Redirects > Rewrite Rules. My actual nginx configuration file is: location / { try_files $uri $uri/ /index.php?q=$uri&$args;} location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ { expires 365d;}location ~* \.(pdf)$ { expires 30d;} The rule I want to set is: Redirect 301 /vehiculos-nuevos.php https://valauto.es/vehiculos/vehiculos-nuevos/ And it's translated to: (ISPConfig says invalid Rewrite Rule) location /vehiculos-nuevos.php { rewrite ^(.*)$ https://valauto.es/vehiculos/vehiculos-nuevos/ redirect;} And i've also tried without location property, trying to set single lines: (Accepted by ISPconfig but error 404) rewrite '^/vehiculos-nuevos.php' '/vehiculos/vehiculos-nuevos/' permanent; But I get error by ISPConfig or error 404 instead of the correct redirection. Thanks in advance for your help!
I think that the correct way to do this is the following: Code: rewrite ^/vehiculos-nuevos.php$ https://valauto.es/vehiculos/vehiculos-nuevos/ permanent;