Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of redirecting the Home Page 301 of Dream Weaving DEDECMS

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article is about the method of redirecting the home page of Dream Weaving DEDECMS. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

Dream weaving DEDECMS home page how to redirect?

DEDECMS home page 301 redirect the primary domain name without www to with www

Recommended study: dream weaving cms

/ / main domain name 301jumps to www $redirect301=1; / / 301Jump switch. 1 means to turn on, 0 means to close $index_file='index.html'; / / specify the default homepage file of the website, DeDeCMS is set to index.html, SSI (shtml/shtm) if (substr ($_ SERVER ['SERVER_NAME'], 0jue 4) is not supported! =' www.'&&$redirect301) / / determine whether there is www {header ('HTTP/1.1 301 Moved Permanently') in URL Header ('Location: http://www.'.$_SERVER['SERVER_NAME']); / / 301Jump to www exit ();}

Add the above code to the home page index.php

If (! file_exists (dirname (_ _ FILE__).'/ data/common.inc.php'))

On top of.

But please note: if your default home page index.html is listed above index.php, then the above method will not work.

Thank you for reading! About weaving dream DEDECMS home page 301 redirect method is shared here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report