-
OEcms v3.1 IIS伪静态正则表达式纠正
-
-
此贴针对IIS+PHP
IIS下运行伪静态,需要ISAPI_Rewrite组件的支持
如果你的空间支持Rewrite组件,请将原来系统下的rewrite/http.ini文件更新为以下版本:
[ISAPI_Rewrite]
RewriteRule ^(.*)/index\.html$ $1/index.php
# URL路由方式一
RewriteRule ^(.*)/contact\.html$ $1/page\.php\?mod=contact
RewriteRule ^(.*)/about\.html$ $1/page\.php\?mod=about
RewriteRule ^(.*)/guestbook\.html$ $1/guestbook.php
RewriteRule ^(.*)/sitemap\.html$ $1/page\.php\?mod=sitemap
RewriteRule ^(.*)/link\.html$ $1/page\.php\?mod=link
RewriteRule ^(.*)/page-([0-9]+)\.html$ $1/page\.php\?mod=detail&id=$2
RewriteRule ^(.*)/info\.html$ $1/info.php
RewriteRule ^(.*)/product\.html$ $1/product.php
RewriteRule ^(.*)/case\.html$ $1/case.php
RewriteRule ^(.*)/solution\.html$ $1/solution.php
RewriteRule ^(.*)/article\.html$ $1/article.php
RewriteRule ^(.*)/download\.html$ $1/download.php
RewriteRule ^(.*)/job\.html$ $1/job.php
RewriteRule ^(.*)/info-([0-9]+)\.html$ $1/info\.php\?mod=detail&id=$2
RewriteRule ^(.*)/info-cat-([0-9]+)\.html$ $1/info\.php\?mod=list&cid=$2
RewriteRule ^(.*)/info-page-([0-9]+)\.html$ $1/info\.php\?mod=list&page=$2
RewriteRule ^(.*)/info-cat-([0-9]+)-([0-9]+)\.html$ $1/info\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/article-([0-9]+)\.html$ $1/article\.php\?mod=detail&id=$2
RewriteRule ^(.*)/article-cat-([0-9]+)\.html$ $1/article\.php\?mod=list&cid=$2
RewriteRule ^(.*)/article-page-([0-9]+)\.html$ $1/article\.php\?mod=list&page=$2
RewriteRule ^(.*)/article-cat-([0-9]+)-([0-9]+)\.html$ $1/article\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/product-([0-9]+)\.html$ $1/product\.php\?mod=detail&id=$2
RewriteRule ^(.*)/product-cat-([0-9]+)\.html$ $1/product\.php\?mod=list&cid=$2
RewriteRule ^(.*)/product-page-([0-9]+)\.html$ $1/product\.php\?mod=list&page=$2
RewriteRule ^(.*)/product-cat-([0-9]+)-([0-9]+)\.html$ $1/product\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/solution-([0-9]+)\.html$ $1/solution\.php\?mod=detail&id=$2
RewriteRule ^(.*)/solution-cat-([0-9]+)\.html$ $1/solution\.php\?mod=list&cid=$2
RewriteRule ^(.*)/solution-page-([0-9]+)\.html$ $1/solution\.php\?mod=list&page=$2
RewriteRule ^(.*)/solution-cat-([0-9]+)-([0-9]+)\.html$ $1/solution\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/case-([0-9]+)\.html$ $1/case\.php\?mod=detail&id=$2
RewriteRule ^(.*)/case-cat-([0-9]+)\.html$ $1/case\.php\?mod=list&cid=$2
RewriteRule ^(.*)/case-page-([0-9]+)\.html$ $1/case\.php\?mod=list&page=$2
RewriteRule ^(.*)/case-cat-([0-9]+)-([0-9]+)\.html$ $1/case\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/job-([0-9]+)\.html$ $1/job\.php\?mod=detail&id=$2
RewriteRule ^(.*)/job-cat-([0-9]+)\.html$ $1/job\.php\?mod=list&cid=$2
RewriteRule ^(.*)/job-page-([0-9]+)\.html$ $1/job\.php\?mod=list&page=$2
RewriteRule ^(.*)/job-cat-([0-9]+)-([0-9]+)\.html$ $1/job\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/download-([0-9]+)\.html$ $1/download\.php\?mod=detail&id=$2
RewriteRule ^(.*)/download-cat-([0-9]+)\.html$ $1/download\.php\?mod=list&cid=$2
RewriteRule ^(.*)/download-page-([0-9]+)\.html$ $1/download\.php\?mod=list&page=$2
RewriteRule ^(.*)/download-cat-([0-9]+)-([0-9]+)\.html$ $1/download\.php\?mod=list&cid=$2&page=$3
# URL路由方式二
RewriteRule ^(.*)/contact$ $1/page\.php\?mod=contact
RewriteRule ^(.*)/about$ $1/page\.php\?mod=about
RewriteRule ^(.*)/sitemap$ $1/page\.php\?mod=sitemap
RewriteRule ^(.*)/link$ $1/page\.php\?mod=link
RewriteRule ^(.*)/page/([0-9]+)\.html$ $1/page\.php\?mod=detail&id=$2
RewriteRule ^(.*)/guestbook$ $1/guestbook.php
RewriteRule ^(.*)/info$ $1/info.php
RewriteRule ^(.*)/product$ $1/product.php
RewriteRule ^(.*)/case$ $1/case.php
RewriteRule ^(.*)/solution$ $1/solution.php
RewriteRule ^(.*)/article$ $1/article.php
RewriteRule ^(.*)/download$ $1/download.php
RewriteRule ^(.*)/job$ $1/job.php
RewriteRule ^(.*)/info/([0-9]+)\.html$ $1/info\.php\?mod=detail&id=$2
RewriteRule ^(.*)/info/cat-([0-9]+)\.html$ $1/info\.php\?mod=list&cid=$2
RewriteRule ^(.*)/info/page-([0-9]+)\.html$ $1/info\.php\?mod=list&page=$2
RewriteRule ^(.*)/info/cat-([0-9]+)-([0-9]+)\.html$ $1/info\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/article/([0-9]+)\.html$ $1/article\.php\?mod=detail&id=$2
RewriteRule ^(.*)/article/cat-([0-9]+)\.html$ $1/article\.php\?mod=list&cid=$2
RewriteRule ^(.*)/article/page-([0-9]+)\.html$ $1/article\.php\?mod=list&page=$2
RewriteRule ^(.*)/article/cat-([0-9]+)-([0-9]+)\.html$ $1/article\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/product/([0-9]+)\.html$ $1/product\.php\?mod=detail&id=$2
RewriteRule ^(.*)/product/cat-([0-9]+)\.html$ $1/product\.php\?mod=list&cid=$2
RewriteRule ^(.*)/product/page-([0-9]+)\.html$ $1/product\.php\?mod=list&page=$2
RewriteRule ^(.*)/product/cat-([0-9]+)-([0-9]+)\.html$ $1/product\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/solution/([0-9]+)\.html$ $1/solution\.php\?mod=detail&id=$2
RewriteRule ^(.*)/solution/cat-([0-9]+)\.html$ $1/solution\.php\?mod=list&cid=$2
RewriteRule ^(.*)/solution/page-([0-9]+)\.html$ $1/solution\.php\?mod=list&page=$2
RewriteRule ^(.*)/solution/cat-([0-9]+)-([0-9]+)\.html$ $1/solution\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/case/([0-9]+)\.html$ $1/case\.php\?mod=detail&id=$2
RewriteRule ^(.*)/case/cat-([0-9]+)\.html$ $1/case\.php\?mod=list&cid=$2
RewriteRule ^(.*)/case/page-([0-9]+)\.html$ $1/case\.php\?mod=list&page=$2
RewriteRule ^(.*)/case/cat-([0-9]+)-([0-9]+)\.html$ $1/case\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/job/([0-9]+)\.html$ $1/job\.php\?mod=detail&id=$2
RewriteRule ^(.*)/job/cat-([0-9]+)\.html$ $1/job\.php\?mod=list&cid=$2
RewriteRule ^(.*)/job/page-([0-9]+)\.html$ $1/job\.php\?mod=list&page=$2
RewriteRule ^(.*)/job/cat-([0-9]+)-([0-9]+)\.html$ $1/job\.php\?mod=list&cid=$2&page=$3
RewriteRule ^(.*)/download/([0-9]+)\.html$ $1/download\.php\?mod=detail&id=$2
RewriteRule ^(.*)/download/cat-([0-9]+)\.html$ $1/download\.php\?mod=list&cid=$2
RewriteRule ^(.*)/download/page-([0-9]+)\.html$ $1/download\.php\?mod=list&page=$2
RewriteRule ^(.*)/download/cat-([0-9]+)-([0-9]+)\.html$ $1/download\.php\?mod=list&cid=$2&page=$3
[attach]269[/attach]
-
17132 次浏览
2 条评论
收藏
作者信息
-
关注
-
试
免费试用
-
咨询热线
-
咨询热线
020-82299 259
-
在线咨询