search
HomeCMS TutorialPHPCMSWhat should I do if phpcms cannot be opened on the mobile phone?

phpcms无法打开手机端是因为伪静态规则不能被识别,其解决办法是在Linux系统中,将“RewriteEngine On RewriteCond%{HTTP_HOST} ^域名.com$ [NC]...”代码保存为“.htaccess”。

What should I do if phpcms cannot be opened on the mobile phone?

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&c=index&a=show&catid={R:1}&id={R:2}&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&c=index&a=show&catid={R:1}&id={R:2}&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&c=index&a=lists&catid={R:1}&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&siteid=1&a=show&catid={R:1}&typeid=&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&c=index&a={R:1}&catid={R:2}" />
            </rule>
 
            </rules>
      </rewrite>
 
        <httpErrors errorMode="DetailedLocalOnly">
            <clear />
        </httpErrors>
    </system.webServer>
</configuration>

The above is the detailed content of What should I do if phpcms cannot be opened on the mobile phone?. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
phpcms是什么框架phpcms是什么框架Apr 20, 2024 pm 10:51 PM

PHP CMS 是一种基于 PHP 的开源内容管理系统,用于管理网站内容,其特点包括易用性、强大功能、可扩展性、安全性高和免费开源。它可以节省时间、提升网站质量、增强协作并降低开发成本,广泛应用于新闻网站、博客、企业网站、电子商务网站和社区论坛等各种网站。

phpcms怎么跳转到详情页phpcms怎么跳转到详情页Jul 27, 2023 pm 05:23 PM

phpcms跳转到详情页方法:1、使用header函数来生成跳转链接;2、循环遍历内容列表;3、获取内容的标题和详情页链接;4、生成跳转链接即可。

微信登录集成指南:PHPCMS实战微信登录集成指南:PHPCMS实战Mar 29, 2024 am 09:18 AM

标题:微信登录集成指南:PHPCMS实战在今天的互联网时代,社交化登录已经成为网站必备的功能之一。微信作为国内最流行的社交平台之一,其登录功能也被越来越多的网站所采用。本文将介绍如何在PHPCMS网站中集成微信登录功能,并提供具体的代码示例。第一步:注册微信开放平台账号首先,我们需要在微信开放平台上注册一个开发者账号,申请相应的开发权限。登录[微信开放平台]

2023年最新phpcms视频教程推荐(二次开发必学)2023年最新phpcms视频教程推荐(二次开发必学)Oct 25, 2019 pm 03:45 PM

很多站长使用PHPCMS进行二次开发建站,PHP中文网特意推出了phpcms视频教程,大家可以随时随地免费观看视频教程,不需要从百度网盘下载,非常方便。

phpcms有评论功能吗phpcms有评论功能吗Feb 16, 2023 am 10:06 AM

phpcms有评论功能。phpcms内置评论模块,提供了让网站的浏览者发布自己见解的功能,使得浏览者可以互动,相互交流自己的看法,来增加网站人气。PHPCMS的评论用户留言的功能,同时还增加了审核功能,防止言论中出现违禁词汇等。对网站管理者而言,PHPCMS的评论模块可以方便的管理用户评论,可以根据时间、关键字、是否审核等条件查找并管理留言内容。

phpcms用什么数据库phpcms用什么数据库Feb 21, 2023 pm 06:57 PM

phpcms用mysql数据库。phpcms是一个PHP开源网站管理系统,采用PHP+MYSQL做为技术基础进行开发。PHPCMS V9采用OOP方式进行基础运行框架搭建,支持的PHP版本是PHP5及以上、支持的MYSQL版本是MySql 4.1以上版本。

phpcms怎么实现微信登陆phpcms怎么实现微信登陆Mar 09, 2023 am 09:33 AM

phpcms实现微信登录的方法:1、在根目录新建“wechat.php”;2、在“\phpcms\modules\member\index.php”下增加“public function wechat() {...}”;3、在“foreground.class.php”文件中通过wechat函数判断用户是否登录即可。

phpcms是什么意思phpcms是什么意思Apr 20, 2024 pm 10:39 PM

PHPCMS 是一款免费开源的内容管理系统 (CMS),特点包括:开放源码、模块化、灵活、用户友好和社区支持。它可用于创建各种类型的网站,包括企业网站、电子商务网站、博客和社区论坛。技术要求包括:PHP 5.6 或更高版本、MySQL、MariaDB 或 PostgreSQL 数据库以及 Apache 或 Nginx Web 服务器。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment