简体   繁体   English

网址重写不适用于FastCGI php

[英]url rewriting not working on FastCGI php

My website running on Linux server with CentOS-5.1, PHP-5.4.25, Server API-CGI/FastCGI. 我的网站在具有CentOS-5.1,PHP-5.4.25,服务器API-CGI / FastCGI的Linux服务器上运行。 my rules defined in .htaccess are not working. 我在.htaccess中定义的规则不起作用。 Can any one guide me what may the issue? 谁能指导我这个问题呢? Or how can I enable rewrite engine on CGI/FastCGI php? 或者如何在CGI / FastCGI php上启用重写引擎?

My htaccess code is 我的htaccess代码是

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

I tried using with and without <IfModule mod_rewrite.so> but no luck 我尝试使用有无<IfModule mod_rewrite.so>但没有运气

在httpd.conf文件中用我的IP地址定义了2次<VirtualHost IP_ADDRESS *> ,我注释了其中一个配置错误,现在可以正常工作了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM