首页 > 一个关于Apache Rewrite从FPM转到FastCGI的问题

一个关于Apache Rewrite从FPM转到FastCGI的问题

目的是想要将PC版http://test.com/front/index这样的Url
在手机版上显示为http://test.com/m/front/index
实际的链接应该是http://test.com/front/index?mode=m

现在我在测试环境上的Rewrite是这么写的:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^m/?(.*)/?$ index.php/$1/?mode=m [QSA,PT,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
一切都可以正常访问,而到了服务器上则出现了问题

本地测试环境是XAMPP(据别人说是FPM),服务器上的是Apache FastCGI
想要请教一下应该如何改写Rewrite规则才能正常解析,谢谢?

【热门文章】
【热门文章】