【发布时间】:2014-05-16 04:38:15
【问题描述】:
这是我第一次尝试 .htaccess
这就是我想要的。
example.com/account/blitzen12 -> example.com/account/index.php?id=10&name=blitzen12
我不想在重写时包含id,可以吗?
Note: id and name which is 10 and blitzen12 is retrive from the database.
到目前为止,这是我尝试过的,但没有成功。
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^account/(.*)$ ./account/index.php?page=account&id=$1&name=$2 [L,NC]
html 代码。
<a href="account/index.php?id=10&name=blitzen12">blitzen12</a>
谁能帮我解决这个问题?谢谢。
【问题讨论】:
标签: php apache .htaccess mod-rewrite