简体   繁体   English

将规则 Apache 重写为 nginx

[英]Rewrite rule Apache to nginx

I need help from professionals:) Can anyone tell me how to rewrite this rules from apache to nginx?我需要专业人士的帮助:) 谁能告诉我如何将此规则从 apache 重写为 nginx?

RewriteRule ^([0-9a-zA-Z]{1,6})$ forum/?to=$1 [L]
RewriteRule ^([0-9]{1,9})/start/(.*)$ forum/?uid=$1&adt=2&url=$2 [L]
RewriteRule ^([0-9]{1,9})/(.*)$ forum/?uid=$1&adt=1&url=$2 [L]

Thanks!谢谢!

here you go..给你 go..

rewrite ^/([0-9a-zA-Z]{1,6})$ /forum/?to=$1 last;
rewrite ^/([0-9]{1,9})/start/(.*)$ /forum/?uid=$1&adt=2&url=$2 last;
rewrite ^/([0-9]{1,9})/(.*)$ /forum/?uid=$1&adt=1&url=$2 last;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM