Home CMS Tutorial DEDECMS How to remove index.html in DreamWeaver

How to remove index.html in DreamWeaver

May 12, 2021 pm 03:10 PM
index.html dream 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();  
?>
Copy after login

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 of this Website
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 ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

index.html what is index.html what is Sep 01, 2023 am 11:43 AM

index.html is a default website homepage file naming convention, used to display the homepage content of the website. It is often used in the root directory of the website as the default website homepage file. In the index.html file, developers can write HTML code to create the layout and content of the website. HTML code consists of a series of tags, each tag has a specific meaning and role. By using different tags and attributes, developers can define the structure, style, and behavior of web pages.

How to import css in DreamWeaver How to import css in DreamWeaver Dec 03, 2020 pm 04:03 PM

How to import css into DreamWeaver: 1. Place the HTML template file in the "templets" folder; 2. Change the suffix of the HTML file to ".htm"; 3. Add "{dede:" in front of the original style path: global.cfg_templets_skin/}" can be used.

What does index.html do? What does index.html do? Mar 07, 2024 am 11:25 AM

index.html is the home page file of a website, and its function is to serve as the entry page of the website. When a user visits a website, the website server will load and display the index.html file by default. Index.html usually contains the basic structure and content of the website, including the title, navigation bar, main content, etc.

Detailed explanation of CMS database file recovery method Detailed explanation of CMS database file recovery method Mar 13, 2024 pm 03:15 PM

The database is the core of website operation and stores important information such as user data and article content. Therefore, the backup and recovery of database files is particularly important during website operation. For websites built using Dreamweaver CMS, the recovery of database files is also a critical task. This article will introduce in detail the recovery method of Dreamweaver CMS database files, and provide specific code examples to help users quickly restore website data and ensure the normal operation of the website. 1. Back up the database file. Before restoring the database file, you first need to ensure that it has been

An article discusses the new features and advantages of Dreamweaver PHP5.7 version An article discusses the new features and advantages of Dreamweaver PHP5.7 version Mar 21, 2023 am 09:36 AM

Dreamweaver is a very famous CMS. It is used by many websites due to its simplicity and ease of use. Its backend is developed using PHP, and the latest official version is Dreamweaver PHP 5.7. In this article, we will explore the new features and advantages of DreamWeaver PHP 5.7 version.

How to solve the problem if Dreamweaver fails to install php7.0 How to solve the problem if Dreamweaver fails to install php7.0 Mar 23, 2023 am 11:11 AM

It is a common situation to encounter problems when installing Dreamweaver. One of the possible problems is that php7.0 cannot be successfully installed. In this article, we will explain how to solve this problem.

A brief analysis of the PHP version and number of components required for DreamWeaver A brief analysis of the PHP version and number of components required for DreamWeaver Mar 21, 2023 am 10:50 AM

DreamWeaver is a very popular website construction system, and its architecture is based on the PHP language. Therefore, Dreamweaver requires PHP to run. So, specifically, how many PHPs are needed to weave dreams? This is not a simple question. This article will introduce the PHP version and number of components required for Dreamweaver from the following aspects.

Is cms a dream weaver? Is cms a dream weaver? Mar 01, 2023 am 09:58 AM

cms is not Dreamweaver, cms refers to content management system, and Dreamweaver is just a kind of cms; Dreamweaver cms refers to Dreamweaver content management system, and content management system is a kind of WEB front-end and back-end office system or process. A software system between websites; cms has many excellent designs based on templates, which can speed up website development and reduce development costs.

See all articles