title: wordpress change to friendly URL with variable using htaccess
body: <p>I have a wordpress site with a page template and 1 variable call uid (user id) , and I wanna change it to friendly url.</p>
  
  <p>from</p>
  
  <pre><code>http://localhost/forum/edit-profile/?uid=1
  </code></pre>
  
  <p>to</p>
  
  <pre><code>http://localhost/forum/edit-profile/1
  </code></pre>
  
  <p>or </p>
  
  <pre><code>http://localhost/forum/edit-profile/uid/1
  </code></pre>
  
  <p>P/S: wordpress already has a .htaccess file , i just wanna add some additional codes to this.</p>
  
  <p>I tried these solutions, but they are not working:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /forumengine/
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /forumengine/index.php [L]
  
  RewrieCond %{QUERY_STRING} !no-redir [NC]
  RewrieCond %{QUERY_STRING} uid=([^&amp;]+) [NC]
  RewriteRule ^(.*/edit-profile)/$ $1/%1 [R=301,NC,L]
  
  RewriteCond %{REQUEST_FILENAME} !-d # not a dir
  RewriteCond %{REQUEST_FILENAME} !-f # not a file
  RewriteRule ^(.*/edit-profile)/(\d+)$ $1/?uid=$2&amp;no-redir [NC,QSA,L]
  &lt;/IfModule&gt;
  </code></pre>