简体   繁体   中英

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. my rules defined in .htaccess are not working. Can any one guide me what may the issue? Or how can I enable rewrite engine on CGI/FastCGI php?

My htaccess code is

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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