friend url on wildcard subdomains htacces, not working <p>i have wildcard subdomains sets already and works fine, now i wish have friends url for the content in thats subdomains, the structure of my site is if the user type subdomain.maindomain.com and the .htaccess redirect to </p> <pre><code>blogs/index.php?user=subdomain </code></pre> <p>where blogs/index.php receive the param and show the correct content</p> <p>now i try to make the url function like this </p> <pre><code>subdomain.maindoamin.com/24/title-of-content </code></pre> <p>and then .htaccess must result </p> <pre><code>blogs/index.php?id_content=24&amp;title=title-of-content </code></pre> <p>i have the next .htaccess</p> <pre><code>Options +FollowSymLinks #this force to server the content always without www. RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.(.*)$ RewriteRule ^(.*)$ http://%1/$1 [R=301] #this is to pass the subdomain like param and show the right content of the user RewriteCond %{HTTP_HOST} !^www\.misite\.com [NC] RewriteCond %{HTTP_HOST} ^([a-z0-9]+)\.misite\.com RewriteRule ^(.*)$ blogs/index.php?url=%1 [QSA,L] #the next line i can't make work to make nice url RewriteRule ^/(.*)/(.*)$ blogs/index.php?idP=$1&amp;name=$2 [L] </code></pre> <p>not working because when i make in index.php</p> <pre><code>echo $_SERVER['REQUEST_URI']; </code></pre> <p>don't show idP=24 show /24/title-of-content and i need $_GET(idP)</p> <p>i really apreciate some light on this stuff i am not expert on htaccess, thanks in advance to everybody. </p>