search
HomeCMS TutorialDEDECMSHow to remove index.html in DreamWeaver

How to remove index.html in DreamWeaver

May 12, 2021 pm 03:10 PM
index.htmldream weaving

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.

How to remove index.html in DreamWeaver

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__).&#39;/data/common.inc.php&#39;))  
    {  
         header(&#39;Location:install/index.php&#39;);  
         exit();  
    }  
    require_once (dirname(__FILE__) . "/include/common.inc.php");  
    require_once DEDEINC."/arc.partview.class.php";  
    $GLOBALS[&#39;_arclistEnv&#39;] = &#39;index&#39;;  
    $row = $dsql->GetOne("Select * From `dede_homepageset`");  
    $row[&#39;templet&#39;] = MfTemplet($row[&#39;templet&#39;]);  
    $pv = new PartView();  
    $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row[&#39;templet&#39;]);  
    $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.

How to remove index.html in DreamWeaver

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!

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!