I'd take a look at using pattern matching in a map
( http://wiki.nginx.org/HttpMapModule ) and redirecting if the default
value isn't found? Maybe not the most effective, but simpler to
maintain...
Steve
On Thu, 2013-02-14 at 17:05 -0500, etrader wrote:
> I want to rewrite subdomains by adding a separate server for subdomains as
>
>
> server {
> server_name domain.com
> ...
> }
> server {
> server_name *.domain.com
> }
>
> but how I can I ass a rewrite rule int the second server to process
> subdomain requests as
>
> keyword.domain.com/query=some to
> domain.com/script.php?query=some&sub=keyword
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236231,236231#msg-236231
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
--
Steve Holdoway BSc(Hons) MIITP
http://www.greengecko.co.nz
Skype: sholdowa
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
( http://wiki.nginx.org/HttpMapModule ) and redirecting if the default
value isn't found? Maybe not the most effective, but simpler to
maintain...
Steve
On Thu, 2013-02-14 at 17:05 -0500, etrader wrote:
> I want to rewrite subdomains by adding a separate server for subdomains as
>
>
> server {
> server_name domain.com
> ...
> }
> server {
> server_name *.domain.com
> }
>
> but how I can I ass a rewrite rule int the second server to process
> subdomain requests as
>
> keyword.domain.com/query=some to
> domain.com/script.php?query=some&sub=keyword
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,236231,236231#msg-236231
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
--
Steve Holdoway BSc(Hons) MIITP
http://www.greengecko.co.nz
Skype: sholdowa
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx