如何改写 apache 的规则成 nginx

RewriteEngine on
RewriteCond %{http_host} ^a.com [NC]
RewriteRule ^(.*)$ http://www.a.com$1 [R=301,L]

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

RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/((?!.).)*(?<!/)$ $0/ [R=301,L]

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

本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!