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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

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

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)