Home  >  Article  >  CMS Tutorial  >  How to change the generated directory of the Dreamweaver website map

How to change the generated directory of the Dreamweaver website map

藏色散人
藏色散人Original
2019-12-09 09:35:562454browse

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";

to:

The code is as follows:

$cfg_cmspath."/sitemap.html";

Change the

code as follows:

$cfg_cmspath."/data/rssmap.html";

to:

The code is as follows:

$cfg_cmspath."/rssmap.html";

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

code as follows:

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

to:

The code is as follows:

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

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";

Modify it as:

The code is as follows:

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

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!

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