在我和我的朋友网站上,我们想知道如何获取?ID = $ ID只是为了显示为http://host/profiles/1/等文件夹
我们猜测htaccess是必需的,但这是怎么做到的? 感谢。
答案 0 :(得分:2)
这样的事情对你有用:
RewriteEngine On
RewriteRule ^profiles/(\d+)/$ /profile?id=$1 [L]
它将globalschat.co.cc/profiles/1/
重写为globalschat.co.cc/profile?id=1