Apache support. htaccess and No input file specified solution
Locate the httpd.conf file in your Apache installation folder conf
LoadModule Rewrite_module modules/mod_rewrite.so If there is a comment symbol # above, please remove it.
Search the options FollowSymLinks and then modify the allowoverride None below it to allowoverride all;
"1"
Did not expect to meet no input file specified because the project uses the URL route, reckoned may be rewrite problem.
Record the solution.
1. Check if Doc_root sets this value
2. Check the. hta file, many frameworks are index.php when the portal file.
The default
Rewriterule ^ (. *) $ index.php/$1 [qsa,pt,l]
The rule will cause no input file specified in Apache fastcgi mode.
Modified into
Rewriterule ^ (. *) $ index.php [l,e=path_info:$1]
OK, the address is properly rewritten.
"2"
We all know that the use of pseudo-static relative to the search engine is relatively friendly, and I in the DreamHost space to enable the pseudo-static function of rewrite, the home page can be accessed, while accessing the inside pages, it prompts: "No input file specified."
Baidu Search, found there are other space quotient also has this problem, the reason is that the space used PHP is fast_cgi mode, and in some cases, can not correctly identify the error caused by Path_info, is WordPress also has the same problem, fortunately found the solution!
We first look at the WordPress and Typecho programs, such as the default. htaccess inside the rules:
Rewriteengine on
Rewritebase/
Rewritecond%{request_filename}!-f
Rewritecond%{request_filename}!-d
Rewriterule ^ (. *) $/index.php/$1 [L]
The hint is: "No input file specified.", that is, there is no valid path to the files. The solution found in Google is to modify the pseudo-static rules as follows:
Rewriteengine on
Rewritebase/
Rewritecond%{request_filename}!-f
Rewritecond%{request_filename}!-d
Rewriterule ^ (. *) $/index.php?/$1 [L]
Add a "?" in front of the regular result "$". , the problem will be solved with it.
Phpstudy Apache support. htaccess and No input file specified solution