Method to remove portal.php: First open the "httpd.conf" file; then add the statement "RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /portal\.php under htaccess \HTTP/" will do.
Recommended: "PHP Video Tutorial"
Remove portal.php
If the server software you use is apache or ngnix, then the method provided below may help you.
The configuration steps are as follows:
1. Open the .htaccess file
In the apache conf file, open httpd.conf
1. Put the document in All AllowOverride None and all are replaced with AllowOverride All
2. Remove the following comments
LoadModule rewrite_module modules/mod_rewrite.so
3. Restart apache
2. How to write htaccess
Add
RewriteEngine on RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /portal\.php\ HTTP/ RewriteRule ^portal\.php$ http://www.abc.com/ [R=301,L]
below htaccess: Attachment: Conventional method of hiding portal.php
1. First set the default domain name in the background domain name,
2. Then add the portal Set as homepage (available, do not check)
3. Create a new navigation link without suffix (than homepage/www.abc.com), add it to the navigation, and set it as available
The above is the detailed content of How to remove portal.php. For more information, please follow other related articles on the PHP Chinese website!