日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

phpcms无法打开手机端怎么办

發(fā)布時間:2023/12/19 综合教程 29 生活家
生活随笔 收集整理的這篇文章主要介紹了 phpcms无法打开手机端怎么办 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

phpcms無法打開手機(jī)端是因為偽靜態(tài)規(guī)則不能被識別,其解決辦法是在Linux系統(tǒng)中,將“RewriteEngine On RewriteCond%{HTTP_HOST} ^域名.com$ [NC]...”代碼保存為“.htaccess”。

phpcms手機(jī)端偽靜態(tài)規(guī)則,手機(jī)端打不開的解決方法

問題描述:phpcms系統(tǒng)換了空間之后,手機(jī)端內(nèi)頁無法打開

問題原因:phpcms的手機(jī)版用的是偽靜態(tài),換到其它服務(wù)商之后,服務(wù)器環(huán)境不一樣,導(dǎo)致偽靜態(tài)規(guī)則不能被識別

推薦:《phpcms教程》

解決方案:這里提供 .htaccess 和 web.config 兩個偽靜態(tài)規(guī)則供大家使用

Linux系統(tǒng),將以下代碼保存為 .htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} ^域名.com$ [NC]
RewriteRule ^(.*)$ http://www.域名.com/$1 [L,R=301]
RewriteRule ^(.*)content-([0-9]+)-([0-9]+)-([0-9]+)\\.html(.*)$ $1/index\\.php\\?m=content&c=index&a=show&catid=$2&id=$3&page=$4
RewriteRule ^(.*)show-([0-9]+)-([0-9]+)-([0-9]+).html(.*)$ $1/index\\.php\\?m=content&c=index&a=show&catid=$2&id=$3&page=$4
RewriteRule ^(.*)list-([0-9]+)-([0-9]+).html(.*)$ $1/index\\.php\\?m=content&c=index&a=lists&catid=$2&page=$3

Windows系統(tǒng),將以下代碼保存為 web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                  
            <rule name="Index" stopProcessing="true">
            <match url="^content-([0-9]+)-([0-9]+)-([0-9]+).html" />
            <action type="Rewrite" url="index.php?m=content&amp;c=index&amp;a=show&amp;catid={R:1}&amp;id={R:2}&amp;page={R:3}" />
            </rule>
             
            <rule name="Show" stopProcessing="true">
            <match url="^show-([0-9]+)-([0-9]+)-([0-9]+).html" />
            <action type="Rewrite" url="index.php?m=content&amp;c=index&amp;a=show&amp;catid={R:1}&amp;id={R:2}&amp;page={R:3}" />
            </rule>
               
            <rule name="list" stopProcessing="true">
            <match url="^list-([0-9]+)-([0-9]+).html" />
            <action type="Rewrite" url="index.php?m=content&amp;c=index&amp;a=lists&amp;catid={R:1}&amp;page={R:2}" />
            </rule>
 
            <rule name="wapshow" stopProcessing="true">
            <match url="^wapshow-([0-9]+)-([0-9]+).html" />
            <action type="Rewrite" url="index.php?m=wap&amp;siteid=1&amp;a=show&amp;catid={R:1}&amp;typeid=&amp;id={R:2}" />
            </rule>
 
            <rule name="waplist" stopProcessing="true">
            <match url="^waplist-([a-zA-Z]+)-([0-9]+).html" />
            <action type="Rewrite" url="index.php?m=wap&amp;c=index&amp;a={R:1}&amp;catid={R:2}" />
            </rule>
 
            </rules>
      </rewrite>
 
        <httpErrors errorMode="DetailedLocalOnly">
            <clear />
        </httpErrors>
    </system.webServer>
</configuration>

總結(jié)

以上是生活随笔為你收集整理的phpcms无法打开手机端怎么办的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。