How to remove index.html from DreamWeaver: First open the index.PHP file in the root directory of DEDECMS; then replace the content with "if(!file_exists(dirname(__FILE__).'/data/common.inc. php')){..}" will do.
The operating environment of this article: Windows 7 system, DedeCMS version 5.6, DELL G3 computer
Remove the suffix index from the homepage of the website for Dreamweaver cms .html method
The search engine will think that / and /index.htm are two different pages. Enter the domain name and it will be redirected to www.dede58.com/index.html immediately, so the path changes. It is long, not conducive to SEO, and will also disperse the weight. After the default DEDECMS homepage is generated statically, when we open the website we built using DEDECMS, the index.html path will be added after the domain name. First of all, it is not very beautiful. Secondly, the rumors are wrong. SEO has an impact.
The simplest and best way is to replace all the code in index.PHP in the root directory of DEDECMS with the following:
<?php if(!file_exists(dirname(__FILE__).'/data/common.inc.php')) { header('Location:install/index.php'); exit(); } require_once (dirname(__FILE__) . "/include/common.inc.php"); require_once DEDEINC."/arc.partview.class.php"; $GLOBALS['_arclistEnv'] = 'index'; $row = $dsql->GetOne("Select * From `dede_homepageset`"); $row['templet'] = MfTemplet($row['templet']); $pv = new PartView(); $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']); $pv->Display(); ?>
After replacement, clear your browser Cache, then open it again to see if there is no index.html. If you have any questions, please contact me.
If you don’t want to use the above method, take Wanwang Virtual Host as an example (picture below): Move the default homepage index.htm to the top, highest priority, save the settings, and go to the website When the home page is updated in the background, there will be no index.html.
Recommended study: "dedecms tutorial"
The above is the detailed content of How to remove index.html in DreamWeaver. For more information, please follow other related articles on the PHP Chinese website!