Can you please help me to setup htaccess

1 replies
Hi warriors I need your help in fixing htaccess.
I want to redirect
/member/Mr.love.htm to
/profile.php?userID=1
As you know Mr.love is username of userID 1.
Means I need username in url.
Please help.
#htaccess #setup
  • Profile picture of the author thatthep
    I don't know how to redirect "/member/Mr.love.htm" to "/profile.php?userID=1" but I do know how to parse "Mr.love" ot "profile.php" then you can query userID from database

    You must to create rewrite rule like this

    RewriteEngine On
    RewriteRule ^member/(.*).htm$ profile.php?userID=$1 [NC,L]
    Then in profile.php you can get value from $_GET['userID'] and do whatever you want.

    Have a nice day.
    {{ DiscussionBoard.errors[7927847].message }}

Trending Topics