Modify the directory method generated by the Dream CMS site map

Source: Internet
Author: User
Tags php file

Many use Dedecms to do station friends, in order to avoid the contents of the data in a random leak, in the robots will be the data directory shielding, but Dede default site map is in the data, shielding this folder words search engine can not crawl to the site map, which is not conducive to SEO optimization , then there is no good way, let Dede generated site map under the system root directory? Below I will introduce you to Dede site Map optimization method.

The following are detailed steps:

1, first in the site root directory to create an RSS folder

2. Modify/dede/makehtml_map.php File

Will

The code is as follows Copy Code
$cfg _cmspath. " /data/sitemap.html ";

Modified to:

The code is as follows Copy Code
$cfg _cmspath. " /sitemap.html ";

Will

The code is as follows Copy Code
$cfg _cmspath. " /data/rssmap.html ";

Modified to:

The code is as follows Copy Code
$cfg _cmspath. " /rssmap.html ";

3, modify the/include/arc.rssview.class.php file will

The code is as follows Copy Code
$murl = $GLOBALS [' Cfg_cmspath ']. " /data/rss/". $this->typeid.". XML ";

Modified to:

The code is as follows Copy Code
$murl = $GLOBALS [' Cfg_cmspath ']. " /rss/". $this->typeid.". XML ";

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

The following content

The code is as follows Copy Code
$typelink = $GLOBALS [' Cfg_cmsurl ']. " /data/rss/". $row->id.". XML ";

Modified to:

The code is as follows Copy Code
$typelink = $GLOBALS [' Cfg_cmsurl ']. " /rss/". $row->id.". XML ";

At this point and then to the site background to generate site map, it will be directly generated to the root directory of the site.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.