Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem that the sitemap cannot be opened and updated after DEDECMS 5.7migrates the data directory?

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces how to solve the problem that the site map can not be opened and updated after the migration of the data directory in DEDECMS 5.7. the article is very detailed and has a certain reference value. Interested friends must finish reading it!

What if the sitemap cannot be opened and updated after DEDECMS 5.7migrates the data directory?

DEDECMS5.7 SP1 version, according to the official prompt, strongly recommended that the data directory be migrated outside web, and the sitemap and rss cannot be opened and updated.

Webmaster friends all know that the rss maps and site maps 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, which results in the embarrassment that we generate maps, but search cannot find them at all. Here's how to change the automatically generated directory.

Recommended study: dream weaving cms

Here are the detailed steps:

1. First log in to ftp and set up a rss folder under the root directory

2. Modify the makehtml_map.php file under your administrator folder (default is dede) in the root directory

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

The code is as follows:

$cfg_cmspath. "/ sitemap.html"; put 22 lines of $cfg_cmspath. "/ data/rssmap.html"

Change to

The code is as follows:

$cfg_cmspath. "/ rssmap.html"

17 lines are ordinary sitemaps and 22 lines are RSS sitemaps.

3. Modify the arc.rssview.class.php under include under the root directory

Change line 71

The code is as follows:

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

Change to

The code is as follows:

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

4. Modify the sitemap.class.php under include under the root directory

Change the 57 lines

The code is as follows:

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

Change to

The code is as follows:

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

Change the 94-line

The code is as follows:

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

Change to

The copy code is as follows:

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

5. Modify / templets/default template file head.htm

Find it around line 11

The code is as follows:

Change sitemap 2.RSS subscription > [code] to

[code] site map 2.RSS subscription

6, enter the background, update the site map, update the RSS file, update the home page.

The above is all the contents of how to solve the problem that the sitemap cannot be opened and updated after DEDECMS 5.7migrating the data directory. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report