phpcms无法打开手机端怎么办-PHPCMS

资源魔 43 0

phpcms无奈关上手机端是由于伪动态规定不克不及被辨认,其处理方法是正在Linux零碎中,将“RewriteEngine On RewriteCond%{HTTP_HOST} ^域名.com$ [NC]...”代码保留为“.htaccess”。

phpcms手机端伪动态规定,手机端打没有开的处理办法

成绩形容:phpcms零碎换了空间之后,手机端内页无奈关上

成绩缘由:phpcms的手机版用的是伪动态,换到其它效劳商之后,效劳器环境纷歧样,招致伪动态规定不克不及被辨认

保举:《phpcms教程》

处理计划:这里提供 .htaccess 以及 web.config 两个伪动态规定供各人应用

Linux零碎,将如下代码保留为 .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零碎,将如下代码保留为 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>

以上就是phpcms无奈关上手机端怎样办的具体内容,更多请存眷资源魔其它相干文章!

标签: phpcms phpcms教程 phpcms技巧 php问题解决

抱歉,评论功能暂时关闭!