Thank you Igor but I think your reply is incorect ...
In your exemple :
[code]
server {
server_name domain.tlm;
location / {
rewrite ^/(.*).html$ http://www.domain.tlm/index.php?sd=&page=$1;
}
location /php/ {
rewrite ^/(.*).html$ http://www.domain.tlm/index.php?sd=;
}
return 404;
}
server {
server_name www.domain.tlm;
location ~ \.html$ {
rewrite ^/(.*).html$ http://www.domain.tlm/index.php?page=$1;
}
...
}
[/code]
You don't redirect the sub-domain... Juste if is empty...
And you juste redirect the HTML page on sub-domain empty, or WWW sub-domain ... =s
*************************************************************************************
Other question : It's possible to just add a GET argument ??
Exemple :
[code]
if( $host ~* "(.*)\.[a-zA-Z0-9_-]*\.[a-zA-Z]{2,4}" )
{
addGet sd $1;
}
[/code]
This code add "?sd=$1" or "&sd=$1" (if there are already arguments GET before or not)
Thank all for help !
Edited 1 time(s). Last edit at 08/01/2009 06:59AM by CactO_o's.