R – Sending custom GET requests in WordPress as clean url’s

url-rewritingwordpress

I have a page called "user" and on that page I show stats about specyfic user,but the url is like http://somepage.com/user/?u=ID , I want to make http://somepage.com/user/ID , tried htaccess, but no result

Best Solution

I would've said htaccess but you say no result?

Are you sure you did it right?

RewriteEngine On
RewriteBase /
RewriteRule  ^user/([.]+)$ user/?u=$1

or something like that.

Sorry if I'm teaching to suck eggs, but at least you can tick it off with someone else giving you the same thing you've tried :)

edit:

OK you've tried that. Now I'm guessing we're looking at this the wrong way?

RewriteRule ^user/?u=([.]+)$ User/$1

I'm not sure if wordpress will understand this though.

Related Question