適用于Apache,Lighttpd,IIS,Nginx環境下Rewrite偽靜態規則,可正向或反向轉換。

to Nginx

Apache rewrite rule: Wordpress
RewriteRule ^store-([0-9]+)\.html$ store.php?id=$1
Nginx rewrite rule: Wordpress , Magento , Discuz!X
rewrite ^/(.*)([^/])$ http://$host/$1$2/ permanent;
if (!-e $request_filename) {
    return 404;
}
IIS7 rewrite rule: Discuz!X
<rule name="forum_viewthread">
<match url="^(.*/)*thread-([0-9]+)-([0-9]+)-([0-9]+).html\?*(.*)$" />
<action type="Rewrite" url="{R:1}/forum.php\?mod=viewthread&amp;tid={R:2}&amp;extra=page%3D{R:4}&amp;page={R:3}&amp;{R:5}" />
</rule>
英文网球比分