最新消息:伪静态技术大全博客开通啦!再也不为伪静态东奔西走!更多问题可以反映给博主:野狼,QQ1615241386 QQ交流群:112696646

永易搜CMS系统伪静态规则

伪静态规则实例 野狼 286浏览

永易搜CMS因为是目前市面上比较好的建站系统,对SEO特别好。永易搜科技对于网站的静态化、目录化、百度数据对接做的相当到位,伪静态规则因为在发展阶段,所以变化也比较大,主要是3.0版本之后的规则和之前的规则变化比较大。

一、3.0版本以前的伪静态规则如下:

httpd.conf伪静态文件

RegistrationName=Longshui Chen
RegistrationCode=7Z3NU-7MAP5-JZDPH-PR9GK
[ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32
#请在下面加入自己的代码;若两条规则同时符合某链接,以先出现的规则为准
RewriteRule /index.html$ /index.php [I]
RewriteRule /([a-zA-Z0-9\/]+)/([0-9]+).html$ /article.php?path=$1/$2.html [I]

#栏目页面排除

RewriteCond $1 !^(admin|yysAdmin|yysadmin|yelangbak|phpMyAdmin|s)
RewriteRule /([a-zA-Z0-9\/]+)/$ /list.php?path=$1 [I]

RewriteRule /([a-zA-Z0-9\/]+)/list_([0-9]+).html$ /list.php?path=$1&p=$2 [I]
RewriteRule /sitemap.xml$ /sitemap.xml.php [I]

web.config伪静态文件

<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
<system.webServer>
<handlers>
<remove name=”php_5.2″ />
<remove name=”php_5.3″ />
<remove name=”php_5.4″ />
<remove name=”php_5.5″ />
<remove name=”php_5.6″ />
<remove name=”php_7.0″ />
<remove name=”php_7.1″ />
<add name=”php_5.2″ path=”*.php” verb=”*” modules=”FastCgiModule” scriptProcessor=”XXX:\XXXX\XXXX\php\5.2\php-cgi.exe” resourceType=”Unspecified” requireAccess=”Script” />
</handlers>
<rewrite>
<rules>
<rule name=”r1″>
<match url=”^([a-zA-Z0-9\/]+)\/list_([0-9]+).html$” ignoreCase=”false” />
<action type=”Rewrite” url=”list.php\?path={R:1}&amp;p={R:2}” appendQueryString=”false” />
</rule>
<rule name=”r2″>
<match url=”^([a-zA-Z0-9\/]+)\/([a-z0-9\-_]+).html$” ignoreCase=”false” />
<action type=”Rewrite” url=”article.php\?path={R:1}/{R:2}.html” appendQueryString=”false” />
</rule>
<rule name=”r3″>
<match url=”^(tag\/.+)\/$” ignoreCase=”false” />
<action type=”Rewrite” url=”list.php\?path={R:1}” appendQueryString=”false” />
</rule>
<rule name=”r4″>
<match url=”^([a-zA-Z0-9\/]+)\/$” ignoreCase=”false” />
<conditions logicalGrouping=”MatchAll”>
<add input=”{R:1}” pattern=”^(admin|yysAdmin|yysadmin|s)” ignoreCase=”true” negate=”true” />
</conditions>
<action type=”Rewrite” url=”list.php\?path={R:1}” appendQueryString=”false” />
</rule>
<rule name=”r5″>
<match url=”^(sitemap|rss).xml$” ignoreCase=”false” />
<action type=”Rewrite” url=”api/{R:1}.xml.php” />
</rule>
<rule name=”r6″>
<match url=”^([a-zA-Z0-9\-]+).html$” ignoreCase=”false” />
<action type=”Rewrite” url=”topic.php\?path={R:1}” />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

因为考虑到更强的实战性,里边的一些无效的或者跟系统配置相关的项目没有去掉,你可以根据自己的系统不同特点而改变。

二、3.0版本之后的伪静态规则如下:

web.config伪静态文件

<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name=”r1″>
<match url=”^([a-zA-Z0-9\/]+)\/list_([0-9]+).html$” ignoreCase=”false” />
<action type=”Rewrite” url=”list.php\?path={R:1}&amp;p={R:2}” appendQueryString=”false” />
</rule>
<rule name=”r2″>
<match url=”^([a-zA-Z0-9\/]+)\/([a-z0-9\-_]+).html$” ignoreCase=”false” />
<action type=”Rewrite” url=”article.php\?path={R:1}/{R:2}.html” appendQueryString=”false” />
</rule>
<rule name=”r3″>
<match url=”^(tag\/.+)\/$” ignoreCase=”false” />
<action type=”Rewrite” url=”list.php\?path={R:1}” appendQueryString=”false” />
</rule>
<rule name=”r4″>
<match url=”^(s\/)$” ignoreCase=”false” />
<action type=”Rewrite” url=”search.php” appendQueryString=”true” />
</rule>
<rule name=”r5″>
<match url=”^([a-zA-Z0-9\/]+)\/$” ignoreCase=”false” />
<conditions logicalGrouping=”MatchAll”>
<add input=”{R:1}” pattern=”^(admin|yysAdmin|yysadmin|s)” ignoreCase=”true” negate=”true” />
</conditions>
<action type=”Rewrite” url=”list.php\?path={R:1}” appendQueryString=”false” />
</rule>
<rule name=”r6″>
<match url=”^(sitemap|rss).xml$” ignoreCase=”false” />
<action type=”Rewrite” url=”api/{R:1}.xml.php” />
</rule>
<rule name=”r7″>
<match url=”^([a-zA-Z0-9\-]+).html$” ignoreCase=”false” />
<action type=”Rewrite” url=”topic.php\?path={R:1}” />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>

.htaccess格式的伪静态规则如下:

RewriteRule ^([a-zA-Z0-9\/]+)/([0-9]+).html$ article.php?path=$1/$2.html [L]

RewriteCond $1 !^(admin|yysAdmin|yysadmin|yelangbak|phpMyAdmin|s)

RewriteRule ^([a-zA-Z0-9\/]+)/$ list.php?path=$1 [L]

RewriteRule ^([a-zA-Z0-9\/]+)/list_([0-9]+).html$ list.php?path=$1&p=$2 [L]

RewriteRule ^(sitemap|rss).xml$ api/$1.xml.php [L]

RewriteRule ^([a-zA-Z0-9\-]+).html$ topic.php?path=$1 [L]

RewriteRule ^(s\/)$ search.php [L]

RewriteRule ^(tag\/.+)\/ list.php\?path=$1 [L]

后续如果有其他版本的伪静态规则整理出来,也会贴出来供大家使用。

转载请注明:伪静态技术博客 » 永易搜CMS系统伪静态规则