Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to modify the name of data directory on Zhimeng DEDECMS website

2025-03-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to modify the name of the data directory on the Weaving Dream DEDECMS website. I hope you will gain a lot after reading this article. Let's discuss it together.

Dream weaving DEDECMS website how to modify the data directory name?

Recently, dedecms loopholes occur frequently, and dream weaving officials have also given a lot of corresponding measures. What I'm going to tell you today is that dedecms officially advises users to change the name of the data file. For virtual hosts, some virtual hosts are not allowed to move outside the web directory, so in order to minimize the possibility of website attack, we can rename the data directory, which further reduces the possibility of attack.

1. Modify the common.inc.php file in the include directory. Open the file and find line 16:

The code is as follows:

Define ('DEDEDATA', DEDEROOT.'/data')

Change data to the name of the directory you want to change, such as 22badata, then change it to:

The code is as follows:

Define ('DEDEDATA', DEDEROOT.'/22badata')

2. Use FTP to rename the data directory to 22badata, which is the same as the file name changed in the first step.

3, in the background of the website, system-system basic parameters-performance options, "template cache directory:" change to: / 22badata/tplcache.

This is basically completed, but there are still some problems. Open the website directory and you will find that you have skipped to the installation file. Don't worry, modify the index.php file in the root directory of the website, comment out the first few lines of the file, and comment as follows, that is, add / / before the code, and the code is as follows:

The code is as follows:

/ / if (! file_exists (dirname (_ FILE__).'/ data/common.inc.php')) / / {/ / header ('Location:install/index.php'); / / exit (); / /}

In this way, your website can be opened normally. In the background update, there is still a problem, the site map with RSS, JS these updates have problems, then we just need to create a new data directory under the root directory of the site, and then create a new rss and js directories under the data directory, so that it will be OK, and then update to see if all are normal?

Note: the above-mentioned change directory is 22badata, where 22badata can be freely changed to the directory name you want.

After reading this article, I believe you have a certain understanding of how to modify the data directory name on the dream weaving DEDECMS website. Want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report