Question : wilcard dns and complex htaccess

hello

actualy i have implanted an wilcard DNS in my server to one of my sites

i am using this logic

username.site.com

and it is the rewrite of site.com/index.php?client=username

but i have some pages for username ( index.php?client=username&page=contact )

i would like to make the rewrite  like that

username.site.com/contact.html

i am using this code under my .htaccess

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]+)\.site\.com$ [NC]
RewriteCond %1 !^www$ [NC]
RewriteRule ^$ /index.php?client=%1 [L]


and it work perfectly with username.site.com

and the needed thing is to make it working with username.site.com/xxxx.html

Answer : wilcard dns and complex htaccess

> and the needed thing is to make it working with username.site.com/xxxx.html
1:
2:
3:
4:
5:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]+)\.site\.com$ [NC]
RewriteCond %1 !=www [NC]
RewriteRule ^([a-z]+\.html)?$ /index.php?client=%1&page=$1 [L]
Random Solutions  
 
programming4us programming4us