I use wild card for my subdomains and I need to know how can I do to make the friendly urls I have this RewriteCond %{ENV:REDIRECT_SUBDOMAIN} ="" RewriteCond %{HTTP_HOST} ^([a-z0-9][-a-z0-9]+)\.domain\.com\.?(:80)?$ [NC] RewriteCond %{DOCUMENT_ROOT}/%1 -d RewriteRule ^(.*) index.php?act=$1 [E=SUBDOMAIN:%1,L] RewriteRule ^ - [E=SUBDOMAIN:%{ENV:REDIRECT_SUBDOMAIN},L] Code (markup): In index.php from my subdomain I have echo $_GET['act']; The output from index.php is subdomain1/kjglkjhlkjh/ when I access http://subdomain1.domain.com/kjglkjhlkjh/ As you see I need the output only kjglkjhlkjh Thanks in advance!