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
1754 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:

  • 网站地图
  • 2.
  • RSS订阅
  • > [code] 改为

    [code]

  • 网站地图
  • 2.
  • RSS订阅
  • 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
    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!