【发布时间】:2014-02-26 01:44:25
【问题描述】:
我的 htacess 代码是:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /demo/kingstate/
RewriteCond %{THE_REQUEST} /detail\.php\?id=([^\s&]+) [NC]
RewriteRule ^ id/%1? [R=302,L]
RewriteRule ^id/([0-9]+)/?$ detail.php?id=$1 [L,QSA,NC].
我的网址从 http://tinmandevserver.com/demo/kingstate/detail.php?id=1 更改为
http://tinmandevserver.com/demo/kingstate/id/1 使用 htaccess 文件,但我想要一个 url
点赞http://tinmandevserver.com/demo/kingstate/propperty-house-victoria。
这是我第一次编写 htaccess 代码。
【问题讨论】:
-
“proppery-house-victoria”从何而来?
-
property 是静态值,因为 house 是一种属性类型,它可能是 house,apartment nd 等等,维多利亚是地方......我如何在我的 url 中获得这个值