rules from apache to nginx.
For URLs of the type: /admin/hotels.html
which should internally rewrite to /admin/index.php?site=hotels
in apache I had a rule
RewriteRule ^(.*)(\.html?)$ index.php?site=$1 [L]
Been playing for quite some time in nginx, but cant get it to work. My current location:
location /admin/ {
# Redirect everything that isn't a real file to index.php
try_files $uri $uri/ /admin/index.php$is_args$args;
}
Any ideas?
https://www.nginx.com/blog/creating-nginx-rewrite-rules/
Обсуждают сегодня