title: Cleanning urls with htaccess
body: <p>i am trying to use RewriteRules to get clean urls using my HTACCESS file.</p>
  
  <p>here is what i have so far</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  
  RewriteRule ^([^/]+)/$ $1.php
  RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
  RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
  RewriteRule (.*)$ /$1/ [R=301,L]
  </code></pre>
  
  <p>The above code takes a url that looks like this company.com/about.php and turns it into company.com/about/ so all my links url are like this "/about/" i didnt add the .php because of the rewrite rule. </p>
  
  <p>what i am trying to do now is add a rule that will clean my url when parameter is passed. for example
  company.com/about/?profile=member_name i want it to look like company.com/about/member_name</p>
  
  <p>i have tried the two rewrite code below but it doesn't work.</p>
  
  <pre><code>RewriteRule ^([a-zA-Z0-9]+)$ /our_work.php/ [L]
  RewriteRule ^/our_work.php([^/\.]+)/?$ ?project=$1 [L]
  </code></pre>
  
  <p>please keep in mind that my file extension is already being striped from the url.</p>
  
  <p>Please help</p>
  
  <p>Thank you in advance</p>