您好,欢迎来到95分类目录!
当前位置:95分类目录 » 站长资讯 » 35dir专区 » 文章详细 订阅RssFeed

修复伪静态部分问题,让其适配程序

来源:本站原创 浏览:71次 时间:2025-04-02
简介:修复伪静态部分问题,让其适配程序

nginx环境:

# 首页、分类浏览、数据归档、最近更新、排行榜、意见反馈

if ($uri ~ "^/(index|webdir|weblink|article|category|update|archives|top|feedback|link|rssfeed|sitemap)(.html|/?)") {
rewrite ^/(index|webdir|weblink|article|category|update|archives|top|feedback|link|rssfeed|sitemap)(.html|/?) /index.php?mod=$1 last;
}
# 最近更新和数据归档
if ($uri ~ "^/(update|archives)(-|/)(d+)(-|/)(d+)(.html|/?)") {
rewrite ^/(update|archives)(-|/)(d+)(-|/)(d+)(.html|/?) /index.php?mod=$1&date=$3&page=$5 last;
}
# 站内搜索
if ($uri ~ "^/search(-|/)(name|url|tags|baidu|intro|br|pr|sr)(-|/)(.*)(-|/)?(d+)?(.html|/?)") {
rewrite ^/search(-|/)(name|url|tags|baidu|intro|br|pr|sr)(-|/)(.*)(-|/)?(d+)?(.html|/?) /index.php?mod=search&type=$2&query=$4&page=$6 last;
}
# 站点详细、文章详细、链接详细、单页
if ($uri ~ "^/(siteinfo|artinfo|linkinfo|diypage)(-|/)(d+)(.html|/?)") {
rewrite ^/(siteinfo|artinfo|linkinfo|diypage)(-|/)(d+)(.html|/?) /index.php?mod=$1&wid=$3 last;
}
# RSS
if ($uri ~ "^/rssfeed(-|/)(.+)(-|/)?(d+)?(.html|/?)") {
rewrite ^/rssfeed(-|/)(.+)(-|/)?(d+)?(.html|/?) /index.php?mod=rssfeed&type=$2&cid=$4 last;
}
# SiteMap
if ($uri ~ "^/sitemap(-|/)(.+)(.html|/?)") {
rewrite ^/sitemap(-|/)(.+)(.html|/?) /index.php?mod=sitemap&cid=$2 last;
}
# 分类目录
if ($uri ~ "^/(webdir|article)(-|/)(.+)(-|/)(d+)(-|/)(d+)(.html|/?)") {
rewrite ^/(webdir|article)(-|/)(.+)(-|/)(d+)(-|/)(d+)(.html|/?) /index.php?mod=$1&cid=$5&page=$7 last;
}
# PHP 处理
if (!-e $request_filename) {
rewrite ^ /index.php last;

}

Apache环境:

	
RewriteEngine On
# 首页、分类浏览、数据归档、最近更新、排行榜、意见反馈
RewriteRule ^(index|webdir|weblink|article|category|update|archives|top|feedback|link|rssfeed|sitemap)(.html|/?)$ index.php?mod=$1 [L]
# 最近更新
RewriteRule ^(update|archives)(-|/)(d+)(-|/)(d+)(.html|/?)$ index.php?mod=$1&date=$3&page=$5 [L]
# 站内搜索
RewriteRule ^search(-|/)(name|url|tags|baidu|intro|br|pr|sr)(-|/)(.*)(-|/)?(d+)?(.html|/?)$ index.php?mod=search&type=$2&query=$4&page=$6 [L]
# 站点详细、文章详细、链接详细、单页
RewriteRule ^(siteinfo|artinfo|linkinfo|diypage)(-|/)(d+)(.html|/?)$ index.php?mod=$1&wid=$3 [L]
# RSS
RewriteRule ^rssfeed(-|/)(.+)(-|/)?(d+)?(.html|/?)$ index.php?mod=rssfeed&type=$2&cid=$4 [L]
# SiteMap
RewriteRule ^sitemap(-|/)(.+)(.html|/?)$ index.php?mod=sitemap&cid=$2 [L]
# 分类目录
RewriteRule ^(webdir|article)(-|/)(.+)(-|/)(d+)(-|/)(d+)(.html|/?)$ index.php?mod=$1&cid=$5&page=$7 [L]
IIS环境:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <!-- 首页、分类浏览、数据归档、最近更新、排行榜、意见反馈 -->
                <rule name="GeneralPages" stopProcessing="true">
                    <match url="^(index|webdir|weblink|article|category|update|archives|top|feedback|link|rssfeed|sitemap)(.html|/?)$" />
                    <action type="Rewrite" url="index.php?mod={R:1}" />
                </rule>

                <!-- 最近更新和数据归档 -->
                <rule name="UpdateAndArchives" stopProcessing="true">
                    <match url="^(update|archives)(-|/)(d+)(-|/)(d+)(.html|/?)$" />
                    <action type="Rewrite" url="index.php?mod={R:1}&amp;date={R:3}&amp;page={R:5}" />
                </rule>

                <!-- 站内搜索 -->
                <rule name="Search" stopProcessing="true">
                    <match url="^search(-|/)(name|url|tags|baidu|intro|br|pr|sr)(-|/)(.*)(-|/)?(d+)?(.html|/?)$" />
                    <action type="Rewrite" url="index.php?mod=search&amp;type={R:2}&amp;query={R:4}&amp;page={R:6}" />
                </rule>

                <!-- 站点详细、文章详细、链接详细、单页 -->
                <rule name="DetailPages" stopProcessing="true">
                    <match url="^(siteinfo|artinfo|linkinfo|diypage)(-|/)(d+)(.html|/?)$" />
                    <action type="Rewrite" url="index.php?mod={R:1}&amp;wid={R:3}" />
                </rule>

                <!-- RSS -->
                <rule name="RSS" stopProcessing="true">
                    <match url="^rssfeed(-|/)(.+)(-|/)?(d+)?(.html|/?)$" />
                    <action type="Rewrite" url="index.php?mod=rssfeed&amp;type={R:2}&amp;cid={R:4}" />
                </rule>

                <!-- SiteMap -->
                <rule name="SiteMap" stopProcessing="true">
                    <match url="^sitemap(-|/)(.+)(.html|/?)$" />
                    <action type="Rewrite" url="index.php?mod=sitemap&amp;cid={R:2}" />
                </rule>

                <!-- 分类目录 -->
                <rule name="CategoryDirectory" stopProcessing="true">
                    <match url="^(webdir|article)(-|/)(.+)(-|/)(d+)(-|/)(d+)(.html|/?)$" />
                    <action type="Rewrite" url="index.php?mod={R:1}&amp;cid={R:5}&amp;page={R:7}" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>    

以上伪静态需在 35分类目录: 35分类目录【优站】适配 php7.0 分享版 这个版本适配,别的旧版35分类目录不适配

© 版权声明

推荐站点

  • 我的电视我的电视

    我的电视是一个在线观看高清影视电影的免费站点

    my0713.com
  • 优站库 - 新型分类目录优站库 - 新型分类目录

    一个集网站推荐、内容推荐于一体的宝藏之地。我们精心搜罗各类常用网站,构建起全面的网站目录。无论是学习提升所需的在线课程平台,还是休闲娱乐的影视音乐网站,亦或是商务办公的效率工具站点,都能在我们的分类大全中快速找到。同时,我们也是一个充满活力的建站交流社区。站长们在此分享经验、探讨技术,共同提升网站建设水平。作为网址导航,我们为你清晰分类,节省寻找优质网站的时间和精力。在这里,你无需再为找不到合适的网站而烦恼,只需轻轻一点,就能开启精彩的网络之旅。

    www.uzkoo.com
  • Bible Verse of the DayBible Verse of the Day

    Get your free Bible Verse of the Day

    verseoftheday.online
  • Retro GamesRetro Games

    Play classic retro games online for free. Enjoy NES, SNES, Genesis/MD, Neo Geo, GBA and arcade emulator games directly in your browser. The best free retro games collection.

    classicgamezone.com
  • TikTok動画保存TikTok動画保存

    ティックトック動画を無料でロゴなし保存。高画質でTikTok動画をダウンロードできるサービスです。簡単操作で動画を保存できます。

    ttsavehub.com