httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt ." <>
Subject [users@httpd] Subdomain Rewrite including HTTP -> HTTPS
Date Sun, 11 Jan 2015 15:33:39 GMT
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: -> foo.tld/foo/sub

as sub is %1 and foo is %2 I thought this would do the trick.

RewriteCond %{HTTP_HOST} ^([^.]+)\.foo\.tld$
RewriteRule ^(/[^\s]+)? http://foo\.tld/%2/%1$1

I can so a [P] behind the rewrite rule when I want to proxy to some
other domain if needed.

What happens at the moment that when I do I'm redirected
with a 302 to:


As I hav this in my ssl vhost and in both the non-ssl vhost:

ServerAlias *.foo.tld

I would assume this should be working.

I'm actually not sure how to rewrite all http requests to https in this matter.

Why am I gettting a redirect (302) at the moment and what am I doing
wrong here ?



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message