thinkphp Hidden index.php after 500
System linux+php5.3
tp3.1.2
Modify Httpd.conf's mod_rewrite.so module semicolon according to the Handbook of TP
And then there's allowoverride none to change none to all (this place in the httpd.conf there are 5, I have changed into all, do not know whether it is correct, or just need to modify a place on it? )
Url_model set to 2 This is also set to 2 in the config file, and then in writing one. Htaccess is placed in the root directory of the site, the content is as follows
Rewriteengine on
Rewritecond%{request_filename}!-d
Rewritecond%{request_filename}!-f
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]
And then restart the httpd, the results suggest that the Internal Server Error, at the beginning I thought it was my Apache problem, and finally I see the other site is normal (this Linux has multiple sites), and finally put. htaccess to open the site after the return to normal, If there is a problem with the htaccess, it can be explained. htaccess there is a problem, is not the content of this inside there is a problem, or need to php.ini in setting up the other?
------Solution--------------------
Rewriteengine on
#如果目录存在就直接访问目录不进行RewriteRule
Rewritecond%{request_filename}!-d
#如果文件存在, the file is accessed directly without the following rewriterule. (Do not overwrite if file or file does not exist)
Rewritecond%{request_filename}!-f
#所有找不着实际路径的文件, the unified handing over to index.php processing
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]
TP itself with. htaccess
You look at this http://blog.csdn.net/qq1355541448/article/details/21375407.