php - rewrite url with dynamic host name

brissbill

New Member
I need to rewrite url with rule like below\[code\]RewriteRule ^files/([a-z0-9-\.]+)$ files/domain.com/$1\[/code\]domain.com is current host name. It is dynamic (don't ask why plz). So I can not do like this. Anyway, how I can get current host name and put it like this:\[code\]RewriteRule ^files/([a-z0-9-\.]+)$ files/{{ current host name with out www. }}/$1\[/code\]
 
Back
Top