backend rewrite of subdomains
Wayne E. Seguin
wayneeseguin at gmail.com
Thu Dec 20 00:18:42 MSK 2007
On Dec 19, 2007 3:59 PM, Eden Li <eden at mojiti.com> wrote:
> server {
> # no server_name statement
>
> set $subdomain "index.html";
> if ($http_host ~ "^(.+?)\.") {
> set $subdomain $1;
> }
>
> rewrite ^/(.*) http://staging.example.com/$subdomain/$1 last;
> }
>
> Thanks for the reply Eden!
This alas does not do the trick.
changing last to permanent semi works except that it rewrites the users url
which is not the goal.
So I need something that is transparent to the user. Any more ideas?
Thanks again!
~Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20071219/1bcccd65/attachment-0001.html>
More information about the nginx
mailing list