Home > CMS Tutorial > DEDECMS > body text

What should I do if the site map cannot be opened and updated after migrating the data directory in DEDECMS 5.7?

藏色散人
Release: 2019-12-16 09:12:28
Original
1830 people have browsed it

What should I do if the site map cannot be opened and updated after migrating the data directory in DEDECMS 5.7?

DEDECMS 5.7 What should I do if the site map cannot be opened and updated after migrating the data directory?

DEDECMS5.7 SP1 version, according to the official prompts, it is strongly recommended to migrate the data directory outside the web. The site map and RSS cannot be opened and updated.

Friends of webmasters are As you know, the rss map and website map generated by DEDECMS by default are generated in the DATA folder, but this is a very important folder. Generally, we prohibit search engines from crawling this folder in Robots.txt. This is This caused the embarrassment that we generated the map, but couldn’t find it in the search. Let’s teach you how to change the automatically generated directory

Recommended learning: 梦Weavercms

The following are detailed steps:

1, first log in to ftp, create an rss folder in the root directory

2, modify your administrator file in the root directory Makehtml_map.php file under folder (default is dede)

Change $cfg_cmspath."/data/sitemap.html"; on line 17 to

The code is as follows:

$cfg_cmspath."/sitemap.html"; 将22行的$cfg_cmspath."/data/rssmap.html";
Copy after login

Changed to

The code is as follows:

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

Line 17 is the ordinary site map, Line 22 is the RSS site map

3, modify the arc under include in the root directory .rssview.class.php

Change the

code in line 71 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 sitemap.class.php

under include in the root directory. Change the

code on line 57 as follows:

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

to

The code is as follows:

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

Change the

code of line 94 as follows:

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

to

Copy the code as follows:

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

5, modify the /templets/default template file head.htm

Find the

code around line 11 as follows:

<li class="r3"><a href="{dede:global.cfg_dataurl/}/sitemap.html">网站地图</a></li> 2.<li class="r4"><a href="{dede:global.cfg_dataurl/}/rssmap.html">RSS订阅</a></li>> 
[code]
改为</p> <p>[code]<li class="r3"><a href="{dede:global.cfg_cmsurl/}/sitemap.html">网站地图</a></li> 2.<li class="r4"><a href="{dede:global.cfg_cmsurl/}/rssmap.html">RSS订阅</a></li>
Copy after login

6, enter the background and update the website Map, update RSS files, update home page.

The above is the detailed content of What should I do if the site map cannot be opened and updated after migrating the data directory in DEDECMS 5.7?. 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