How to allow /X/ instead of ?ID=X access in URLs? [duplicate]
On me and my friends site we are wondering how to get ?ID=$ID just to show as a folder such as http://host/profiles/1/
We are guessing htaccess is required, but how is this done? Thanks.
Something like this should work for you:
RewriteEngine On
RewriteRule ^profiles/(\d+)/$ /profile?id=$1 [L]
It rewrites globalschat.co.cc/profiles/1/
to globalschat.co.cc/profile?id=1
精彩评论