How to set up pseudo-static in DEDECMS 5.7
DEDECMS 5.7伪静态怎么设置
织梦内容管理系统(DedeCms) 以简单、实用、开源而闻名,是国内最知名的PHP开源网站管理系统,也是使用用户最多的PHP类CMS系统,dedecms5.7功能更强大和实用,但是一些朋友对dede5.7的伪静态设置不是很熟悉,下面,就为大家分享一下dede5.7伪静态的设置方法。(推荐教程:dedecms教程)
第一步、后台-系统参数-核心设置-是否使用伪静态:选择“是”;
注:你的网站空间是否支持伪静态,你可以与空间的IDC商联系一下,如果是自己的服务器,那就更好办了,自己动手,丰衣足食。一般来说,空间都是支持伪静态的。Apache服务器伪静态相对简单,直接在.htaccess文件中加入相应伪静态规则即可;而IIS服务器伪静态的实现,则需要加载Rewrite组件,然后配置httpd.ini文件。
第二步、如果你的网站已经存在生成的静态栏目或文章HTML,那么只需在后台-系统-SQL命令行工具中执行如下语句:
将所有文档设置为“仅动态浏览”:
1 |
|
将所有栏目设置为“使用动态页”:
1 |
|
第三步、列表页、文章页伪静态修改
打开/include/helpers/channelunit.helper.php。
(1)查找:
1 2 3 4 5 |
|
替换为
1 2 3 4 5 |
|
意思是:将默认的/plus/view-1-1.html文章链接格式改为/DedeCMS/DedeCMS5.7-1-1.html。
(2) 查找:
1 2 |
|
替换为
1 2 |
|
意思是:将默认的频道或是列表页URL/plus//list.php?tid=1变更为/dedecms/list-1.html形式。
第四步、列表分页伪静态修改
打开/include/arc.listview.class.php
查找:
1 |
|
替换为
1 |
|
将默认的plus/list.php?tid=替换成RMB/list-;
意思是:将默认的列表分页链接格式plus/list.php?tid=x$x$xl修改为DedeCMS/DedeCMS5.7-x-x-x.html。
第五步、文章分页伪静态
打开/include/arc.archives.class.php,找到获取动态的分页列表GetPagebreakDM()函数末尾处:
查找:
1 |
|
替换为
1 |
|
将默认的plus/view.php?tid=替换成RMB/huilv-;
意思是:将默认的文章分页链接格式plus/view.php?tid=x$x$xl修改为DedeCMS/DedeCMS5.7-x-x-x.html
第六步、TAG标签伪静态
DedeCms默认的TAG标签URL,形如/tags.php?/dedecms模板 /,是不是觉得有个问号不怎么爽,我们改成/tags/dedecms模板 /,是不是好看多了。
下面我们来改一下,打开/include/taglib/tag.lib.php:
查找:
1 |
|
替换为
1 |
|
这样就修改好了,上传你到你的网站,切记:要记得将原网站备份哦!!
第七步、httpd.ini伪静态规则:
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
将上面代码保存为:httpd.ini 上传到网站的根目录。
如无特特殊需求建议采用官方默认的生成静态的页面方式浏览。
The above is the detailed content of How to set up pseudo-static in DEDECMS 5.7. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

As we all know, optimizing the SEO of a website is a very important part of website operation. The default URLs of dynamic web systems (such as PHP) used by many websites have extensions (.php, .html, etc.), which will affect the SEO effect of the website. In order to improve the optimization effect of the website, a common practice is to change the dynamic URL to a pseudo-static URL to hide the extension name and improve the user experience and search engine ranking of the website. This article will take "pseudo-static hidden php suffix" as the theme, introduce how to achieve this optimization in PHP websites, and

Empire CMS template download location: Official template download: https://www.phome.net/template/ Third-party template website: https://www.dedecms.com/diy/https://www.0978.com.cn /https://www.jiaocheng.com/Installation method: Download template Unzip template Upload template Select template

Template replacement can be implemented in Dedecms through the following steps: modify the global.cfg file and set the required language pack. Modify the taglib.inc.php hook file and add support for language suffix template files. Create a new template file with a language suffix and modify the required content. Clear Dedecms cache.

How to upload local videos using Dedecms? Prepare the video file in a format that is supported by Dedecms. Log in to the Dedecms management backend and create a new video category. Upload video files on the video management page, fill in the relevant information and select the video category. To embed a video while editing an article, enter the file name of the uploaded video and adjust its dimensions.

Dedecms is an open source CMS that can be used to create various types of websites, including: news websites, blogs, e-commerce websites, forums and community websites, educational websites, portals, other types of websites (such as corporate websites, personal websites, photo album websites, video sharing website)

Dedecms is an open source Chinese CMS system that provides content management, template system and security protection. The specific usage includes the following steps: 1. Install Dedecms. 2. Configure the database. 3. Log in to the management interface. 4. Create content. 5. Set up the template. 6. Manage users. 7. Maintain the system.

Improve website security: Pseudo-static rules implement PHP suffix hiding. With the development of the Internet, website security issues have become increasingly prominent, including the prevention of malicious attacks and the protection of user data. An effective measure is to hide the PHP suffix through pseudo-static rules, which helps improve the security of the website and protect user privacy. In achieving this goal, we need to use some specific code examples to demonstrate how to achieve PHP suffix hiding. First, we need to understand what pseudo-static rules are. Pseudo-static is a method of converting dynamic web page links into

DedeCMS is an open source content management system that has some potential vulnerabilities and security risks: 1. SQL injection vulnerability. Attackers can perform unauthorized operations or obtain sensitive data by constructing malicious SQL query statements; 2. File Upload vulnerability, attackers can upload files containing malicious code to the server to execute arbitrary code or obtain server permissions; 3. Sensitive information leakage; 4. Unauthenticated vulnerability exploitation.
