适用于Apache,Lighttpd,IIS,Nginx环境下Rewrite伪静态规则,可正向或反向转换。
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&tid={R:2}&extra=page%3D{R:4}&page={R:3}&{R:5}" />
© 版权声明
文章版权归作者所有,未经允许请勿转载。