[ISAPI_Rewrite] # Destoon B2B # 3600 = 1 hour CacheClockRate 3600 RepeatLimit 32 # Protect httpd.ini and httpd.parse.errors files # from accessing through HTTP RewriteRule ^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$ /404\.php RewriteRule ^(.*)/file/(.*)\.php(.*)$ /404\.php RewriteRule ^(.*)-htm-(.*)$ $1\.php\?$2 RewriteRule ^(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$ $1/show\.php\?itemid=$2&page=$4 RewriteRule ^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$ $1/list\.php\?catid=$2&page=$4 RewriteRule ^(.*)/show/([0-9]+)/([0-9]+)?([/])?$ $1/show\.php\?itemid=$2&page=$3 RewriteRule ^(.*)/list/([0-9]+)/([0-9]+)?([/])?$ $1/list\.php\?catid=$2&page=$3 RewriteRule ^(.*)/([A-za-z0-9_\-]+)-c([0-9]+)-([0-9]+)\.html$ $1/list\.php\?catid=$3&page=$4 RewriteRule ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)/(.*)\.html$ $1/index\.php\?homepage=$2&file=$3&rewrite=$4 RewriteRule ^(.*)/com/([a-z0-9_\-]+)/([a-z]+)([/])?$ $1/index\.php\?homepage=$2&file=$3 RewriteRule ^(.*)/com/([a-z0-9_\-]+)([/])?$ $1/index\.php\?homepage=$2 RewriteRule ^(.*)/([a-z]+)/(.*)\.shtml$ $1/$2/index\.php\?rewrite=$3
6、IIS7服务器
规则(参考)为:
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule> <match url="^(.*)\.(asp|aspx|asa|asax|dll|jsp|cgi|fcgi|pl)(.*)$" /> <action type="Rewrite" url="/404.php" /> </rule> <rule> <match url="^(.*)/file/(.*)\.php(.*)$" /> <action type="Rewrite" url="/404.php" /> </rule> <rule> <match url="^(.*)-htm-(.*)$" /> <action type="Rewrite" url="{R:1}.php?{R:2}" /> </rule> <rule> <match url="^(.*)/show-([0-9]+)([\-])?([0-9]+)?\.html$" /> <action type="Rewrite" url="{R:1}/show.php?itemid={R:2}&page={R:4}" /> </rule> <rule> <match url="^(.*)/list-([0-9]+)([\-])?([0-9]+)?\.html$" /> <action type="Rewrite" url="{R:1}/list.php?catid={R:2}&page={R:4}" /> </rule> <rule> <match url="^(.*)/show/([0-9]+)/([0-9]+)?([/])?$" /> <action type="Rewrite" url="{R:1}/show.php?itemid={R:2}&page={R:3}" /> </rule> <rule> <match url="^(.*)/list/([0-9]+)/([0-9]+)?([/])?$" /> <action type="Rewrite" url="{R:1}/list.php?catid={R:2}&page={R:3}" /> </rule> <rule> <match url="^(.*)/([A-za-z0-9_\-]+)-c([0-9]+)-([0-9]+)\.html$" /> <action type="Rewrite" url="{R:1}/list.php?catid={R:3}&page={R:4}" /> </rule> <rule> <match url="^(com)/([a-z0-9_\-]+)/([a-z]+)/(.*)\.html$" /> <action type="Rewrite" url="index.php?homepage={R:2}&file={R:3}&rewrite={R:4}" /> </rule> <rule> <match url="^(com)/([a-z0-9_\-]+)/([a-z]+)([/])?$" /> <action type="Rewrite" url="index.php?homepage={R:2}&file={R:3}" /> </rule> <rule> <match url="^(com)/([a-z0-9_\-]+)([/])?$" /> <action type="Rewrite" url="index.php?homepage={R:2}" /> </rule> <rule> <match url="^([a-z]+)/(.*)\.shtml$" /> <action type="Rewrite" url="{R:1}/index.php?rewrite={R:2}" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
Rewrite生效后,请在网站后台=》网站设置=》SEO优化=》URL Rewrite,选择“开启”提交。
然后进入各模块的模块设置“SEO设置”选择对应伪静态地址规则
选择“更新地址”提交即可。
您可能感兴趣的文章: