Apache server appears no input file specified perfect solution

Source: Internet
Author: User

When the pseudo-static function of rewrite is enabled, the homepage can be accessed, and when the inside page is accessed, it prompts: "No input file specified."

The reason is that the PHP used is fast_cgi mode, and in some cases, can not correctly identify the errors caused by path_info, WordPress pseudo-Static also has the same problem.

WordPress program default. htaccess inside the rules:

Rewriteengine Onrewritebase/rewritecond%{request_filename}!-frewritecond%{request_filename}!-dRewriteRule ^ (. *) $ /index.php/$1 [L]

"No input file specified." is not caused by a valid path to the files.

Modify the pseudo-static rule as follows:

Rewriteengine Onrewritebase/rewritecond%{request_filename}!-frewritecond%{request_filename}!-dRewriteRule ^ (. *) $ /index.php?/$1 [L]

Have you found any difference?

In fact, there's a "/$1" in front of the regular result. , the problem will be solved with it.


Apache server appears no input file specified perfect solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.