We are trying to map a subdomain to a regular EE template group, without changing the URL.
Assume that the 'natural' URLs to the templates would look something like this:
The desired subdomain set up would therefore look something like this:
The rewrite rule we have set up on the subdomain looks something like this:
RewriteRule ^(.*)$ http://my-domain.com/group/$1 [P]
which, as I understand, will proxy the request to the 'natural' URL.
The problem we are having is that by the time the proxied request hits the server, the
/group portion of the URL has been duplicated. So the request ends up looking something like this:
which obviously doesn't work.
- If I remove the
[P]flag, the rewriting works correctly. (i.e. the request ends up looking something like
- I have tried using other segments after the domain in the rewrite rule, (just fake ones e.g.
/abc) and the same thing happens with them.
Could there be anything ExpressionEngine is doing to handle / map a request which could be affecting a proxied request?