Dede background move data directory to Web root directory

Source: Internet
Author: User
Keywords Dede Backstage
Tags access clear code configuration data directory example file

Dede move the data directory to the Web root directory: First, make it clear where the folder is safest without affecting access. The best advice is to place the parent directory in the root directory of the Server program folder, which is the Web accessible directory. Here, for example, the local root directory: D:\xampp\htdocs, the folder Htdocs is the root directory of the site.

The easiest way to move is to cut the folder and paste it. As shown in the figure, data has been moved to the same directory as the Htdocs folder.

Access to the background of the home page is not accessible at this time. The reason for this is that data is the basic configuration file for the background page and the cache. What about it? Simply reset the path to the data in the configuration file. In fact, mobile Data folder, the entire system has affected a lot of places. The following talks.

Locate the/include/common.inc.php file in the system directory, as shown in the figure. Then use Notepad to open, look up: "Define (' Dededata ', Dederoot.") /data '); This line of code. shown in the picture.

Modify the code to: define (' Dededata ', dederoot. /.. /data ');

Save it.

Then refresh the background of the main page: http://your website address/dedetest/index.php#, where the Dedetest is the original system Dede folder, in order to security has been modified before. (see

Dream-Weaving DEDECMS system security Article modification default Admin directory

, and can be accessed normally after refreshing.

In addition to modifying the common.inc.php configuration in a common file, configure the Tplcache cache file directory. As I said earlier, the data directory is primarily a folder of basic configuration files and cached data. Modified to:/. /data/tplcache

After the modification is complete, do not think that completes, if at this time you visit the website homepage, will discover will automatically jump to this address: http://localhost/install/index.php, right ah, is jumps to installs the file. What then?

Please open the site root directory index.php, note that the first backup file. for recovery. Locate the code as shown in the diagram and modify it to:

if (!file_exists dirname (__file__). /.. /data/common.inc.php '))

{

Header (' location:install/index.php ');

Exit ();

}

Save and refresh the home page, (Refresh the home page, not refresh the jump installation files AH.) Or you can click directly from the background as shown in the picture. can solve the problem.




Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.