想向各位菊苣请教一个Apache Rewrite的问题

浏览:499 发布日期:2016/07/19 分类:求助交流 关键字: Apache PHP Rewrite
想向各位菊苣请教一个Apache Rewrite的问题
目的是想要将PC版http://test.com/front/index这样的Url,在手机版上显示为http://test.com/m/front/index

实际的链接应该是http://test.com/front/index?mode=m

现在我在PC版上的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>
在XMAPP的调试环境下是正常的,但是到服务端就不能正常解析了,想请教下是什么问题?
最佳答案
评论( 相关
后面还有条评论,点击查看>>