RewriteCond %{HTTP_HOST} ^[a-z]+.orbno.com$
RewriteCond %{HTTP_HOST} !^(www.)?orbno.com$
RewriteCond %{REQUEST_URI} download/
RewriteRule (.*) /download.php\?action=$1&user=%1 [L]
Two small issues, this is the output:
array(2) { [‘action’]=> string(23) ‘download/email-logo.png’ [‘user’]=> string(0) ” }
-
I want the user to be the subdomain they are accessing, i have wild-card DNS, how do i pass that, since %1 isnt working.
-
Is there a way to only pass email-logo.png instead of download/email-logo.png.
Lump in #apache on freenode helped me out.
RewriteCond %{HTTP_HOST} ^([a-z]+).orbno.com$ RewriteCond %{HTTP_HOST} !^(www.)?orbno.com$ RewriteRule download/(.+) download.php?action=$1&user=%1
Thanks though.