[users@httpd] Subdomain Rewrite including HTTP - HTTPS

2015-01-11 Thread Matt .
Hi All, I'm having some trouble at the moment with a rewrite rule which keeps the filled in domainname in the addressbar of the browser. I want to rewrite: sub.foo.tld - foo.tld/foo/sub as sub is %1 and foo is %2 I thought this would do the trick. RewriteCond %{HTTP_HOST} ^([^.]+)\.foo\.tld$

[users@httpd] Rewrite Subdomain to Userfolder without Loop

2015-01-11 Thread Rap Achmed
Hello, I'm trying to rewrite subdomains to user folders and rewriting the rootdomain to some other domain: RewriteCond %{HTTP_HOST} ^mydomain\.tld [OR] RewriteCond %{HTTP_HOST} ^www\.mydomain\.tld RewriteRule ^(.*) http://otherdomain\.tld [L] RewriteCond %{HTTP_HOST} !^www\.mydomain.tld$