For PHP hiding entry files
Step 1: Enable the apache rewrite module and restart apache
LoadModule rewrite_module modules/mod_rewrite.so
Step 2: rewrite the distributed configuration file. htaccess in the same directory as the project root directory and the entry file.
The content is as follows:
<IfModule mod_rewrite.c> Options + FollowSymlinks RewriteEngine On # Hide the entry file RewriteCond % {REQUEST_FILENAME} in the distributed configuration file }! -D RewriteCond % {REQUEST_FILENAME }! -F RewriteRule ^ (. *) $ index. php/$1 [QSA, PT, L] </IfModule>
Or
RewriteEngine On RewriteCond % {REQUEST_FILENAME }! -D RewriteCond % {REQUEST_FILENAME }! -F RewriteRule (. *) index. php/$1
The effect is as follows:
Summary
The above is a small series of questions about the PHP hidden entry file, I hope to help you, if you have any questions, please leave a message, the small series will reply to you in a timely manner. Thank you very much for your support for the help House website!