How to redirect with nginx to an url with file extensions -
what have written far in config looks following:
server { hear 80; server_name www.thissouldberedirected.com; rewrite ^ http://www.example.de/nice/stillnice/nice.html permanent; }
the result http://www.example.de/nice/stillnice/nice.html/ causes page not found...
what need http://www.example.de/nice/stillnice/nice.html
here code i'm using create php file convert directory
rewrite ^/test/$ /test.php last;
before : example.com/test.php
after example.com/test/
what u looking 301 redirect
if ( $request_filename ~ old-page/ ) { rewrite ^ http://newdomain/next-best-page/? permanent; }
source: https://jeffsebring.com/2012/nginx-301-redirects/
nginx
No comments:
Post a Comment