Home > CMS Tutorial > DEDECMS > body text

How to change the generated directory of the Dreamweaver website map

藏色散人
Release: 2019-12-09 09:35:56
Original
2459 people have browsed it

How to change the generated directory of the Dreamweaver website map

How to change the generated directory of the Dreamweaver website map?

Many friends who use DEDECMS to build websites have blocked the data directory in robots to avoid leaking the contents of the data directory. However, DEDE's default site map is under data. If this folder is blocked, search engines will not be able to crawl the site map, which is not conducive to SEO optimization. So is there a good way to put the site map generated by DEDE under the system root directory? Now I will introduce to you the DEDE website map optimization method.

Recommended learning: Dream Weaver cms

The following are the detailed steps:

1. First, create an rss folder in the root directory of the website

2. Modify the /dede/makehtml_map.php file

Change the

code as follows:

$cfg_cmspath."/data/sitemap.html";
Copy after login

to:

The code is as follows:

$cfg_cmspath."/sitemap.html";
Copy after login

Change the

code as follows:

$cfg_cmspath."/data/rssmap.html";
Copy after login

to:

The code is as follows:

$cfg_cmspath."/rssmap.html";
Copy after login

3. Modify /include/arc. In the rssview.class.php file, change the

code as follows:

$murl = $GLOBALS['cfg_cmspath']."/data/rss/".$this->TypeID.".xml";
Copy after login

to:

The code is as follows:

$murl = $GLOBALS['cfg_cmspath']."/rss/".$this->TypeID.".xml";
Copy after login

4. Modify /include/sitemap. class.php file

Change the following content

The code is as follows:

$typelink = $GLOBALS['cfg_cmsurl']."/data/rss/".$row->id.".xml";
Copy after login

Modify it as:

The code is as follows:

$typelink = $GLOBALS['cfg_cmsurl']."/rss/".$row->id.".xml";
Copy after login

At this time When the site map is generated in the background of the website, it will be generated directly to the root directory of the website.

The above is the detailed content of How to change the generated directory of the Dreamweaver website map. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!