Clean URLs mod_rewrite & wildcard subdomains
- by Søren Zet
I got this url
http://domain.com/blogs/directory-param
with this rule
RewriteBase /blogs/directory/
RewriteRule ^/blogs/directory-([A-Za-z0-9-]+)$ /blogs/directory/index.php?cat=$1 [L]
so I get /blogs/directory/index.php?cat=param now my problem is the following:
I use wildcards subdomains so every *.domain.com is mapped to domain.com/blogs/ for example soeren.domain.com is mapped to domain.com/blogs and so on...
My problem now is I want a rule for soeren.domain.com/directory-param which points to domain.com/blogs/directory?index.php?cat=param
Do you have any ideas?