Rewrite host

Hi all,

I test to rewrite the sub-domain in /etc/nginx/site-available/default
and I would know if exist a function for add GET argument ?

For example :

if( $host ~* “(.)..{2,4}” )
{
addGet sd $1;
}

This code add “?sd=$1” or “&sd=$1” (if there are already arguments GET
before or not)

If not exist how can I do that ?

Thank you and sorry for my english (I’m french :p)

Posted at Nginx Forum:

Nobody can help me ?

Posted at Nginx Forum:

On Thu, Aug 20, 2009 at 7:37 PM, CactO_o’s[email protected] wrote:

}

This code add “?sd=$1” or “&sd=$1” (if there are already arguments GET before or not)

If not exist how can I do that ?

rewrite?

Thank you and sorry for my english (I’m french :p)
Hello.

If I understand correctly, you need something like this:

server {
listen 80;
server_name ~(.)....*;
rewrite ^ /$request_uri&$1;
}

Posted at Nginx Forum: