Home  >  Article  >  Backend Development  >  apache configures pseudo-static and hides the index.php file

apache configures pseudo-static and hides the index.php file

小云云
小云云Original
2018-03-28 11:53:234608browse

本文主要和大家分享apache配置伪静态并隐藏index.php文件的实例,希望能帮助到大家。

no input file specified错误解决办法:

在网站根目录建.htaccess文件

方法一:

在RewriteRule后面的index.php之后加?

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]

</IfModule>

方法二:

在php.ini中找到

;cgi.force_redirect = 1

去掉前面的分号并且把后面的1改为0

相关推荐:

PHP针对伪静态注入实例分享

关于php伪静态配置的方法详解

php如何实现伪静态的几种方式总结

The above is the detailed content of apache configures pseudo-static and hides the index.php file. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn