您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

phpcms无法打开手机端怎么办

2025/10/18 22:07:12发布18次查看
phpcms无法打开手机端是因为伪静态规则不能被识别,其解决办法是在linux系统中,将“rewriteengine on rewritecond%{http_host} ^域名.com$ [nc]...”代码保存为“.htaccess”。
phpcms手机端伪静态规则,手机端打不开的解决方法
问题描述:phpcms系统换了空间之后,手机端内页无法打开
问题原因:phpcms的手机版用的是伪静态,换到其它服务商之后,服务器环境不一样,导致伪静态规则不能被识别
 推荐:《phpcms教程》
解决方案:这里提供 .htaccess 和 web.config 两个伪静态规则供大家使用
linux系统,将以下代码保存为 .htaccess
rewriteengine onrewritecond %{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=$4rewriterule ^(.*)show-([0-9]+)-([0-9]+)-([0-9]+).html(.*)$ $1/index\.php\?m=content&c=index&a=show&catid=$2&id=$3&page=$4rewriterule ^(.*)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无法打开手机端怎么办的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product