【发布时间】:2016-08-17 08:21:48
【问题描述】:
我的 .htaccess 文件如下,
DirectoryIndex routing.php
RewriteEngine on
RewriteBase /
RewriteCond %{THE_REQUEST} \s/+Milan_Practice/Milan_Mvc/routing\.php[\s?] [NC]
RewriteRule ^ Milan_Practice/Milan_Mvc/ [L,R=302]
RewriteRule ^Milan_Mvc/?$ Milan_Mvc/routing.php [L,NC]
通过应用上面的代码,我得到了如下所示的网址,
http://localhost/Milan_Practice/Milan_Mvc/?name=about
在上面,“?”之后,数据不是我想要的有效格式,
http://localhost/Milan_Practice/Milan_Mvc/about/
所以请为上述代码提供适当的重写规则的建议
提前谢谢你!!!
【问题讨论】: