In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Dream dedecms method to remove the index.html after the domain name? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!
Why remove the index.html from the navigation link? (recommended study: dream weaving cms)
Although the meaning of the two links is the same, the URL to which the link is linked is the same, but from an optimization point of view, removing the index.html from the link is a little higher than the latter.
There are two ways for dedecms to remove index.html from navigation links:
1. Modify the corresponding tag in the template to remove the index.html of the corresponding link.
In the tags where the column link appears (not limited to channe,l,list,arclist), you can use this method as long as the dede tag that can call out the column link.
The methods are as follows:
Add the following code to the tag
Function='str_replace ("index.htm", ", @ me)'
Note: 'str_replace ("index.htm", "", @ me)' / the index.htm in it is changed to index.html or index.htm depending on your actual situation.
Example:
{dede:arclist function='str_replace ("index.htm", "@ me)'}. The underlying call {/ dede:arclist} {dede:list function='str_replace ("index.htm", "", @ me)'}... The underlying call {/ dede:list}
two。 Modify the program file to replace the index.html linked to all columns at once.
File to be modified: include/channelunit.func.php
Find if ($isdefault==-1)
Add in front of
/ / redirect URL if ($ispart > 2) {return $typedir;} if ($defaultname = = 'index.html') {$defaultname =';}
Note: change the index.html to index.html or index.htm depending on your actual situation
After the modification is completed, then regenerate it.
Thank you for reading! After reading the above, do you have a general understanding of the method of weaving dream dedecms to remove the index.html after the domain name? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.