discuz Method to remove "portal.php": First, set the default homepage to "Unavailable" in the navigation settings of the system background; then open "index.php" and modify the content to "$_ENV[ 'domain']['defaultindex']" is enough.
Recommendation: "discuz Tutorial"
discuz Cancel portal.php# in the portal homepage url
## I am planning to use discuz to build a vegetarian website in the past few days. After everything is ready, I always bring portal.php when I visit the portal of discuz. It may be a professional problem. I always bring it in the URL. It feels like It's too eye-catching, and discuz is a product that search engines have always resisted. In order to achieve better SEO for the new site, I decided to remove portal.php from the URL. The operation method is as follows: 1. In the system Set it in the background navigation settings, set the default homepage to "Unavailable", then customize a homepage and fill in "/" in the link. 2. In the program Find$url = empty($_ENV['domain']['app']['default']) ? (!empty($_ENV['domain']['defaultindex']) ? $_ENV['domain']['defaultindex'] : 'forum.php') : 'http://'.$_ENV['domain']['app']['default'];
$_ENV['curapp'] = str_replace('.php', '', $_ENV['domain']['defaultindex']);
$_ENV['curapp'] = 'portal'; //添加这么一条语句,将curapp默认设置为portal,否则默认是forum require './'.$_ENV['curapp'].'.php';
header("LOCATION:http://www.zt520.net"); exit();
The above is the detailed content of discuzHow to remove portal.php. For more information, please follow other related articles on the PHP Chinese website!