我想设置它,以便某些URL将重写(不更改地址栏中的URL)到具有标识参数的特定页面。Nginx wordpress重写模式到一个特定的页面
我想
site.com/reviews/froot_loops_review.php AND
site.com/reviews/froot_loops_review
实际显示
site.com/review?title=froot_loops
此外,我想能够附加任何其他参数,以便:
site.com/reviews/froot_loops_review.php?var=1
会显示在什么:
site.com/review?title=froot_loops&var=1
我很难过,因为这是我第一次编辑nginx conf文件,这是我得到的,但它不起作用(我认为,因为它不会进行第一次匹配) :
location /reviews/ {
rewrite ^/reviews/(.*)_review.php(.*) /review?title=$1 break;
return 403;
}
我在做什么错在这里?我的下一步应该是什么?什么是学习Nginx重写的好资源?