迅睿CMS框架是一款PHP8高性能·簡(jiǎn)單易用的CMS開(kāi)源開(kāi)發(fā)框架,基于MIT開(kāi)源許可協(xié)議發(fā)布,免費(fèi)且不限制商業(yè)使用,是免費(fèi)開(kāi)源的產(chǎn)品,以萬(wàn)端互聯(lián)為設(shè)計(jì)理念,支持的微信公眾號(hào)、小程序、APP客戶端、移動(dòng)端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
PHP程序里面
偽靜態(tài)時(shí),
前端欄目頁(yè)和文章頁(yè)打開(kāi)均是404錯(cuò)誤,
只有首頁(yè)可以正常打開(kāi)訪問(wèn),
是否根目錄的web.config這個(gè)文件配置有問(wèn)題?
如何配置呢?
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
</rules>
</rewrite>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/404.html" responseMode="ExecuteURL" />
</httpErrors>
<defaultDocument>
<files>
<clear />
<add value="index.html" />
<add value="index.asp" />
<add value="index.php" />
<add value="default.aspx" />
<add value="default.asp" />
<add value="index.htm" />
<add value="index.aspx" />
<add value="default.php" />
<add value="default.html" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
這是原始的配置是好的,可以訪問(wèn)欄目頁(yè)也文章頁(yè),但是第二天在訪問(wèn),就打不開(kāi)了,查看根目錄配置文件web.config,變成以下代碼
<rule name="Imported Rule 1">
<match url="^index.html$" ignoreCase="false" />
<action type="Rewrite" url="index.php" />
<rule name="Imported Rule 2">
<match url="^sitemap.html$" ignoreCase="false" />
<action type="Rewrite" url="sitemap.php" />
<rule name="Imported Rule 3">
<match url="^malllist.html$" ignoreCase="false" />
<action type="Rewrite" url="malllist.php" />
<rule name="Imported Rule 4">
<match url="^shoplist.html$" ignoreCase="false" />
<action type="Rewrite" url="shoplist.php" />
<rule name="Imported Rule 5">
<match url="^article.html$" ignoreCase="false" />
<action type="Rewrite" url="article.php" />
<rule name="Imported Rule 6">
<match url="^user/center.html$" ignoreCase="false" />
<action type="Rewrite" url="user/center.php" />
<rule name="Imported Rule 7">
<match url="^mall-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="mall.php?id={R:1}&act={R:2}&page={R:3}" appendQueryString="false" />
<rule name="Imported Rule 8">
<match url="^mall-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="mall.php?id={R:1}&act={R:2}" appendQueryString="false" />
<rule name="Imported Rule 9">
<match url="^mall-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="mall.php?id={R:1}" appendQueryString="false" />
<rule name="Imported Rule 10">
<match url="^view-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="view.php?iid={R:1}&page={R:2}" appendQueryString="false" />
<rule name="Imported Rule 11">
<match url="^view-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="view.php?iid={R:1}" appendQueryString="false" />
<rule name="Imported Rule 12">
<match url="^malllist-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="malllist.php?catid={R:1}&mall={R:2}&page={R:3}" appendQueryString="false" />
<rule name="Imported Rule 13">
<match url="^article_list-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="article_list.php?cid={R:1}&page={R:2}" appendQueryString="false" />
<rule name="Imported Rule 14">
<match url="^article_list-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="article_list.php?cid={R:1}" appendQueryString="false" />
<rule name="Imported Rule 15">
<match url="^read-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="read.php?id={R:1}" appendQueryString="false" />
<rule name="Imported Rule 16">
<match url="^list-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="list.php?cid={R:1}&start_price={R:2}&end_price={R:3}&sort={R:4}&area={R:5}&guarantee={R:6}&list={R:7}&q={R:8}&page={R:9}" appendQueryString="false" />
<rule name="Imported Rule 17">
<match url="^shop-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="shop.php?nick={R:1}&start_price={R:2}&end_price={R:3}&sort={R:4}&area={R:5}&guarantee={R:6}&list={R:7}&q={R:8}&page={R:9}" appendQueryString="false" />
<rule name="Imported Rule 18">
<match url="^shoplist-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="shoplist.php?cid={R:1}&keyword={R:2}&start_level={R:3}&end_level={R:4}&area={R:5}&px={R:6}&cpr={R:7}&type={R:8}&page={R:9}" appendQueryString="false" />
<rule name="Imported Rule 19">
<match url="^shoplist-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="shoplist.php?cid={R:1}" appendQueryString="false" />
<rule name="Imported Rule 20">
<match url="^shop-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="shop.php?nick={R:1}" appendQueryString="false" />
<rule name="Imported Rule 21">
<match url="^list-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="list.php?cid={R:1}" appendQueryString="false" />
<rule name="Imported Rule 22">
<match url="^list.html$" ignoreCase="false" />
<action type="Rewrite" url="list.php" />
<rule name="Imported Rule 23">
<match url="^huangou-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="huangou.php?id={R:1}" appendQueryString="false" />
<rule name="Imported Rule 24">
<match url="^huan-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="huan.php?keyword={R:1}&page={R:2}" appendQueryString="false" />
<rule name="Imported Rule 25">
<match url="^huan.html$" ignoreCase="false" />
<action type="Rewrite" url="huan.php" />
<rule name="Imported Rule 26">
<match url="^coupons-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="coupons.php?cid={R:1}&page={R:2}" appendQueryString="false" />
<rule name="Imported Rule 27">
<match url="^coupons.html$" ignoreCase="false" />
<action type="Rewrite" url="coupons.php" />
<rule name="Imported Rule 28">
<match url="^cuxiao-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="cuxiao.php?id={R:1}" appendQueryString="false" />
<rule name="Imported Rule 29">
<match url="^tg-(.*)-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="tg.php?city_id={R:1}&catid={R:2}&mallid={R:3}&keyword={R:4}&page={R:5}" appendQueryString="false" />
<rule name="Imported Rule 30">
<match url="^tg-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="tg.php?city_id={R:1}&catid={R:2}&mallid={R:3}&page={R:4}" appendQueryString="false" />
<rule name="Imported Rule 31">
<match url="^tg-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="tg.php?city_id={R:1}&catid={R:2}&mallid={R:3}" appendQueryString="false" />
<rule name="Imported Rule 32">
<match url="^tg-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="tg.php?city_id={R:1}" appendQueryString="false" />
<rule name="Imported Rule 33">
<match url="^tg.html$" ignoreCase="false" />
<action type="Rewrite" url="tg.php" />
<rule name="Imported Rule 34">
<match url="^tgview-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="tgview.php?id={R:1}" appendQueryString="false" />
<rule name="Imported Rule 35">
<match url="^img/(.*).jpg$" ignoreCase="false" />
<action type="Rewrite" url="topic.php?pic={R:1}" appendQueryString="false" />
<rule name="Imported Rule 36">
<match url="^baobeilist.html$" ignoreCase="false" />
<action type="Rewrite" url="baobeilist.php" appendQueryString="false" />
<rule name="Imported Rule 37">
<match url="^baobeilist-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="baobeilist.php?catid={R:1}&sort={R:2}&key={R:3}&page={R:4}" appendQueryString="false" />
<rule name="Imported Rule 38">
<match url="^baobei-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="baobei.php?id={R:1}&page={R:2}" appendQueryString="false" />
<rule name="Imported Rule 39">
<match url="^baobei-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="baobei.php?id={R:1}" appendQueryString="false" />
<rule name="Imported Rule 40">
<match url="^userbao-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="userbao.php?id={R:1}&catid={R:2}&xs={R:3}&page={R:4}" appendQueryString="false" />
<rule name="Imported Rule 41">
<match url="^userbao-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="userbao.php?id={R:1}" appendQueryString="false" />
<rule name="Imported Rule 42">
<match url="^tbimg/(.*).jpg$" ignoreCase="false" />
<directoryBrowse enabled="false" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="Default.aspx" />
<add value="index.shtml" />
<security>
<requestFiltering allowDoubleEscaping="true"></requestFiltering>
</security>
<?xml version="1.0" ?> <rules> <rule name="XunRuicms 手機(jī)站 IIS偽靜態(tài)" stopProcessing="true"> <match url="^mobile/(.*)$" ignoreCase="false"/> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true"/> </conditions> <action type="Rewrite" url="/mobile/index.php"/> </rule> <rule name="XunRuicms 電腦站 IIS偽靜態(tài)" stopProcessing="true"> <match url=".(js|ico|gif|jpe?g|bmp|png|css)$" negate="true"/> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true"/> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true"/> </conditions> <action type="Rewrite" url="/index.php"/> </rule> </rules>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="OrgPage" stopProcessing="true">
<match url="^(.*)$" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_HOST}" pattern="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php/{R:1}" />
</rule>
</rules>
</rewrite>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/404.html" responseMode="ExecuteURL" />
</httpErrors>
<defaultDocument>
<files>
<clear />
<add value="index.html" />
<add value="index.asp" />
<add value="index.php" />
<add value="default.aspx" />
<add value="default.asp" />
<add value="index.htm" />
<add value="index.aspx" />
<add value="default.php" />
<add value="default.html" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
這是原始的配置是好的,可以訪問(wèn)欄目頁(yè)也文章頁(yè),但是第二天在訪問(wèn),就打不開(kāi)了,查看根目錄配置文件web.config,變成以下代碼
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1">
<match url="^index.html$" ignoreCase="false" />
<action type="Rewrite" url="index.php" />
</rule>
<rule name="Imported Rule 2">
<match url="^sitemap.html$" ignoreCase="false" />
<action type="Rewrite" url="sitemap.php" />
</rule>
<rule name="Imported Rule 3">
<match url="^malllist.html$" ignoreCase="false" />
<action type="Rewrite" url="malllist.php" />
</rule>
<rule name="Imported Rule 4">
<match url="^shoplist.html$" ignoreCase="false" />
<action type="Rewrite" url="shoplist.php" />
</rule>
<rule name="Imported Rule 5">
<match url="^article.html$" ignoreCase="false" />
<action type="Rewrite" url="article.php" />
</rule>
<rule name="Imported Rule 6">
<match url="^user/center.html$" ignoreCase="false" />
<action type="Rewrite" url="user/center.php" />
</rule>
<rule name="Imported Rule 7">
<match url="^mall-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="mall.php?id={R:1}&act={R:2}&page={R:3}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 8">
<match url="^mall-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="mall.php?id={R:1}&act={R:2}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 9">
<match url="^mall-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="mall.php?id={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 10">
<match url="^view-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="view.php?iid={R:1}&page={R:2}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 11">
<match url="^view-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="view.php?iid={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 12">
<match url="^malllist-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="malllist.php?catid={R:1}&mall={R:2}&page={R:3}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 13">
<match url="^article_list-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="article_list.php?cid={R:1}&page={R:2}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 14">
<match url="^article_list-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="article_list.php?cid={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 15">
<match url="^read-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="read.php?id={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 16">
<match url="^list-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="list.php?cid={R:1}&start_price={R:2}&end_price={R:3}&sort={R:4}&area={R:5}&guarantee={R:6}&list={R:7}&q={R:8}&page={R:9}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 17">
<match url="^shop-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="shop.php?nick={R:1}&start_price={R:2}&end_price={R:3}&sort={R:4}&area={R:5}&guarantee={R:6}&list={R:7}&q={R:8}&page={R:9}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 18">
<match url="^shoplist-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="shoplist.php?cid={R:1}&keyword={R:2}&start_level={R:3}&end_level={R:4}&area={R:5}&px={R:6}&cpr={R:7}&type={R:8}&page={R:9}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 19">
<match url="^shoplist-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="shoplist.php?cid={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 20">
<match url="^shop-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="shop.php?nick={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 21">
<match url="^list-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="list.php?cid={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 22">
<match url="^list.html$" ignoreCase="false" />
<action type="Rewrite" url="list.php" />
</rule>
<rule name="Imported Rule 23">
<match url="^huangou-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="huangou.php?id={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 24">
<match url="^huan-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="huan.php?keyword={R:1}&page={R:2}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 25">
<match url="^huan.html$" ignoreCase="false" />
<action type="Rewrite" url="huan.php" />
</rule>
<rule name="Imported Rule 26">
<match url="^coupons-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="coupons.php?cid={R:1}&page={R:2}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 27">
<match url="^coupons.html$" ignoreCase="false" />
<action type="Rewrite" url="coupons.php" />
</rule>
<rule name="Imported Rule 28">
<match url="^cuxiao-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="cuxiao.php?id={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 29">
<match url="^tg-(.*)-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="tg.php?city_id={R:1}&catid={R:2}&mallid={R:3}&keyword={R:4}&page={R:5}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 30">
<match url="^tg-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="tg.php?city_id={R:1}&catid={R:2}&mallid={R:3}&page={R:4}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 31">
<match url="^tg-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="tg.php?city_id={R:1}&catid={R:2}&mallid={R:3}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 32">
<match url="^tg-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="tg.php?city_id={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 33">
<match url="^tg.html$" ignoreCase="false" />
<action type="Rewrite" url="tg.php" />
</rule>
<rule name="Imported Rule 34">
<match url="^tgview-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="tgview.php?id={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 35">
<match url="^img/(.*).jpg$" ignoreCase="false" />
<action type="Rewrite" url="topic.php?pic={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 36">
<match url="^baobeilist.html$" ignoreCase="false" />
<action type="Rewrite" url="baobeilist.php" appendQueryString="false" />
</rule>
<rule name="Imported Rule 37">
<match url="^baobeilist-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="baobeilist.php?catid={R:1}&sort={R:2}&key={R:3}&page={R:4}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 38">
<match url="^baobei-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="baobei.php?id={R:1}&page={R:2}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 39">
<match url="^baobei-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="baobei.php?id={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 40">
<match url="^userbao-(.*)-(.*)-(.*)-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="userbao.php?id={R:1}&catid={R:2}&xs={R:3}&page={R:4}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 41">
<match url="^userbao-(.*).html$" ignoreCase="false" />
<action type="Rewrite" url="userbao.php?id={R:1}" appendQueryString="false" />
</rule>
<rule name="Imported Rule 42">
<match url="^tbimg/(.*).jpg$" ignoreCase="false" />
<action type="Rewrite" url="topic.php?pic={R:1}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
<directoryBrowse enabled="false" />
<defaultDocument>
<files>
<clear />
<add value="index.asp" />
<add value="index.aspx" />
<add value="index.php" />
<add value="index.html" />
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="Default.aspx" />
<add value="index.shtml" />
</files>
</defaultDocument>
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/404.html" responseMode="ExecuteURL" />
</httpErrors>
<security>
<requestFiltering allowDoubleEscaping="true"></requestFiltering>
</security>
</system.webServer>
</configuration>