In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Today, I will talk to you about how to remove the portal.php in dz. Many people may not know much about it. In order to make you understand better, the editor has summarized the following for you. I hope you can get something according to this article.
Dz's method to remove portal.php: first, set the default home page to "unavailable" in the navigation settings in the system background; then change the content to "$_ ENV ['domain'] [' defaultindex']" in the "index.php" of the root directory of the program; finally, save the file.
These days, I am going to build a vegetarian website with discuz. After everything is ready, I always bring portal.php to visit the portal of discuz. It may be a professional problem, and it is too obnoxious in url. And discuz is a product that search engines have been resisting all the time. In order to get a better seo from the new site, I decided to remove portal.php from url, as follows:
First, set it in the navigation settings in the system background, set the default home page to "unavailable", then customize the home page and fill in "/" in the link.
Find it in the index.php of the root directory of the program
$url = empty ($_ ENV ['domain'] [' app'] ['default'])? (! empty ($_ ENV [' domain'] ['defaultindex'])? $_ ENV [' domain'] ['defaultindex']:' forum.php'): 'http://'.$_ENV['domain']['app']['default'];
Modified to:
$_ ENV ['curapp'] = str_replace (' .php','', $_ ENV ['domain'] [' defaultindex'])
But this will not solve the problem of portal.php in url.
Therefore, through analysis, you can set the default appindex of discuz, or modify it in the index.php file.
$_ ENV ['curapp'] =' portal'; / / add a statement that sets curapp to portal by default, otherwise it defaults to forumrequire'. /'. $_ ENV ['curapp'].' .php'
Why should I set it this way, because I don't want to use the forum function in the early days.
Finally, add a statement in forum.php to block forum access.
Header ("LOCATION: http://www.zt520.net");exit(); after reading the above, do you have any further understanding of how to remove portal.php from dz? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.