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

小云云
Release: 2023-03-22 14:12:01
Original
4609 people have browsed it

本文主要和大家分享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>
Copy after login

方法二:

在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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template