How to rewrite the rules of Apache to nginx


RewriteEngine on
RewriteCond %{http_host} ^ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

RewriteRule ^/redirect/(.*)$ /index/data/redirect.php?param=$1 [L]

RewriteRule ^/((?!.).)*(?<!/)$ $0/ [R=301,L]

RewriteCond %{REQUEST_URI} !^/(public|admin)/{0,1}
RewriteRule ^/ /index.php [L]

This work adoptsCC agreementReprint must indicate the author and the link of this article

Recommended Today

Third party calls wechat payment interface

Step one: preparation 1. Wechat payment interface can only be called if the developer qualification has been authenticated on wechat open platform, so the first thing is to authenticate. It’s very simple, but wechat will charge 300 yuan for audit 2. Set payment directory Login wechat payment merchant platform( pay.weixin.qq . com) — > Product […]