lucy24

msg:4526192 | 10:58 pm on Dec 8, 2012 (gmt 0) |
You need a RewriteCond looking at %{HTTP_HOST}. The capture will be expressed as %1 rather than $1. Let's see what you come up with; it looks as if you've got the basic knowledge already.
|
makkermin

msg:4526202 | 11:51 pm on Dec 8, 2012 (gmt 0) |
Well best I could come up with is: RewriteCond %{HTTP_HOST} ^([A-Za-z0-9_]+).%{HTTP_HOST} RewriteRule (.*) [%{HTTP_HOST}...] But that gave me an 500... Other attempt gave me "endless loop"....
|
lucy24

msg:4526241 | 6:41 am on Dec 9, 2012 (gmt 0) |
Er, why do you have {HTTP_HOST} three times? You only need it once. But first detour to the post at the top of this subforum that explains why you need to use example.com. Oh, and I now realize you will need to do some icky business with proxies (flag [P]) so your domain name doesn't turn the intended behind-the-scenes rewrite into a visible redirect. :: detour to double-check :: | Note that the PT flag is implied in per-directory contexts such as <Directory> sections or in .htaccess files. The only way to circumvent that is to rewrite to -. |
| Sorry. That has nothing to do with your question. I just happened to see it, and it gave me a bit of a jolt. Like the guy who learned he'd been speaking prose all his life.
|
|