您的当前位置:SEO培训教程学习网 > seo优化技术 > 织梦DEDECMS城市分站iis、宝塔伪静态规则

织梦DEDECMS城市分站iis、宝塔伪静态规则

分类: seo优化技术 发布时间: 2020-04-28 09:24

  这篇文章给大家分享一下分站的伪静态规则其中包含 .htaccess,bcloud_nginx_user.conf,Nginx宝塔,以及web.config

  .htaccess 是Apache的静态文件

  bcloud_nginx_user.conf是百度云主机的静态文件

  Nginx是linux宝塔的伪静态文件,复制里面的内容到伪静态设置即可。

  web.config 是IIS的静态文件


  .htaccess 伪静态规则
 

RewriteEngine On
RewriteRule ^.*list-([0-9]+)-([0-9]+)-([0-9]+).html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3 
 
RewriteRule ^.*list-([0-9]+).html$ /plus/list.php?tid=$1
 
RewriteRule ^.*view-([0-9]+).html$ /plus/view.php?arcID=$1
 
RewriteRule ^.*/.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2
RewriteRule ^.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2
 
RewriteRule ^tags/([^-]+).html$ /tags.php?/$1/
RewriteRule ^.*/tags/([^-]+).html$ /tags.php?/$1/
 
RewriteRule ^tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2
RewriteRule ^.*/tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2

RewriteRule ^index.html$ index.php
RewriteRule ^.*/index.html$ index.php

bcloud_nginx_user.conf 伪静态规则
 

rewrite ^/.*list-([0-9]+)-([0-9]+)-([0-9]+).html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3;
rewrite ^/.*list-([0-9]+).html$ /plus/list.php?tid=$1;
rewrite ^/.*view-([0-9]+).html$ /plus/view.php?arcID=$1;
rewrite ^/.*/.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2;
rewrite ^/.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2;
rewrite ^/tags/([^-]+).html$ /tags.php?/$1/;
rewrite ^/.*/tags/([^-]+).html$ /tags.php?/$1/;
rewrite ^/tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2;
rewrite ^/.*/tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2;
rewrite ^/index.html$ /index.php;
rewrite ^/.*/index.html$ /index.php;

宝塔Nginx伪静态规则

rewrite ^/.*list-([0-9]+)-([0-9]+)-([0-9]+).html$ /plus/list.php?tid=$1&totalresult=$2&PageNo=$3;
rewrite ^/.*list-([0-9]+).html$ /plus/list.php?tid=$1;
rewrite ^/.*view-([0-9]+).html$ /plus/view.php?arcID=$1;
rewrite ^/.*/.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2;
rewrite ^/.*-([0-9]+)-([0-9]+).html$ /plus/view.php?aid=$1&pageno=$2;
rewrite ^/tags/([^-]+).html$ /tags.php?/$1/;
rewrite ^/.*/tags/([^-]+).html$ /tags.php?/$1/;
rewrite ^/tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2;
rewrite ^/.*/tags/([^-]+)-([0-9]+).html$ /tags.php?/$1/$2;
rewrite ^/index.html$ /index.php;
rewrite ^/.*/index.html$ /index.php;

web.config 是IIS的伪静态规则
 

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <clear />
                <rule name="tool.apizl.com rewriteTools1" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^.*list-([0-9]+)-([0-9]+)-([0-9]+).html" ignoreCase="false" />
                    
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="/plus/list.php?tid={R:1}&amp;totalresult={R:2}&amp;PageNo={R:3}" appendQueryString="false" />
                </rule><rule name="tool.apizl.com rewriteTools3" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^.*list-([0-9]+).html" ignoreCase="false" />
                    
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="/plus/list.php?tid={R:1}" appendQueryString="false" />
                </rule><rule name="tool.apizl.com rewriteTools5" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^.*view-([0-9]+).html" ignoreCase="false" />
                    
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="/plus/view.php?arcID={R:1}" appendQueryString="false" />
                </rule><rule name="tool.apizl.com rewriteTools7" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^.*/.*-([0-9]+)-([0-9]+).html" ignoreCase="false" />
                    
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="/plus/view.php?aid={R:1}&amp;pageno={R:2}" appendQueryString="false" />
                </rule><rule name="tool.apizl.com rewriteTools8" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^.*-([0-9]+)-([0-9]+).html" ignoreCase="false" />
                    
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="/plus/view.php?aid={R:1}&amp;pageno={R:2}" appendQueryString="false" />
                </rule><rule name="tool.apizl.com rewriteTools10" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^tags/([^-]+).html" ignoreCase="false" />
                    
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="/tags.php?/{R:1}/" appendQueryString="false" />
                </rule><rule name="tool.apizl.com rewriteTools11" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^.*/tags/([^-]+).html" ignoreCase="false" />
                    
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="/tags.php?/{R:1}/" appendQueryString="false" />
                </rule><rule name="tool.apizl.com rewriteTools13" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^tags/([^-]+)-([0-9]+).html" ignoreCase="false" />
                    
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="/tags.php?/{R:1}/{R:2}" appendQueryString="false" />
                </rule><rule name="tool.apizl.com rewriteTools14" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^.*/tags/([^-]+)-([0-9]+).html" ignoreCase="false" />
                    
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="/tags.php?/{R:1}/{R:2}" appendQueryString="false" />
                </rule><rule name="tool.apizl.com rewriteTools16" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^index.html" ignoreCase="false" />
                    
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="index.php" appendQueryString="false" />
                </rule><rule name="tool.apizl.com rewriteTools17" patternSyntax="ECMAScript" stopProcessing="false">
                    <match url="^.*/index.html" ignoreCase="false" />
                    
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="index.php" appendQueryString="false" />
                </rule>
            </rules>
        </rewrite>
        <httpErrors>
 
</httpErrors>
    </system.webServer>
</configuration>