ThinkPHP uses URL rewriting to hide the app's entry file index. php I use apache
[Apache] the mod_rewrite.so module is loaded in the httpd. conf configuration file, removing. AllowOverride None changes "None" to "All". if All the values are modified, 404 is returned. Set the project URL mode to 2. 'URL _ model' => 2. Save the following content as a. htaccess file and place it in the same directory of the application entry file.
RewriteEngine on # if the directory exists, access the directory directly without RewriteRule RewriteCond % {REQUEST_FILENAME }! -D # if the file exists, access the file directly without RewriteRule. (if the file does not exist or the file does not exist, rewrite it.) RewriteCond % {REQUEST_FILENAME }! -F # all files that cannot find the actual path should be handed over to index. php for RewriteRule ^ (. *) $ index. php/$1 [QSA, PT, L]