简体   繁体   中英

Rewrite rule Apache to nginx

I need help from professionals:) Can anyone tell me how to rewrite this rules from apache to 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..

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;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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