You can hide the app's portal file through URL rewriting index.php , which is the configuration reference for the relevant server:
"Apache"
- The mod_rewrite.so module is loaded in the httpd.conf configuration file
- AllowOverride none Changes none to all (PS: none of all allowoverride corresponding to all)
- Save the following content as a. htaccess file in the same sibling directory as the application portal file
<ifmodule mod_rewrite.c>+followsymlinks-%{request_filename}-%{request_ FILENAME}-^ (. *) $ index.php?/$1 [qsa,pt,L]</IfModule>
all of the above has been completed, after restarting Apache or failed, because the configuration in the "httpd-vhosts.conf" with include does not change to allow URL rewriting.
Just add
DocumentRoot "f:/wamp/www/test"ServerName www. Test. comserveralias admin. Tpshop. Comdirectoryindex index. HTML index.htm Index. phpoptions followsymlinksallowoverride noneOrderAllow,denyallow from all
Change into
DocumentRoot "f:/wamp/www/test"ServerName www. Test. comserveralias admin. Tpshop. Comdirectoryindex index. HTML index.htm Index. phpoptions followsymlinksallowoverrideall Orderallow,denyallow from all
Then save and restart Apache.
Linux Server in Apache hidden index.php failed