Welcome! Log In Create A New Profile

Advanced

Re: [Rewrite] Url - rewriting

August 01, 2009 06:53AM
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.
Subject Author Posted

[Rewrite] Url - rewriting

CactO_o's July 30, 2009 12:22PM

Re: [Rewrite] Url - rewriting

CactO_o's July 30, 2009 02:03PM

Re: [Rewrite] Url - rewriting

CactO_o's July 30, 2009 02:03PM

Re: [Rewrite] Url - rewriting

Igor Sysoev July 30, 2009 02:23PM

Re: [Rewrite] Url - rewriting

CactO_o's July 30, 2009 05:07PM

Re: [Rewrite] Url - rewriting

Igor Sysoev July 31, 2009 05:26AM

Re: [Rewrite] Url - rewriting

Andrius Semionovas July 30, 2009 02:28PM

Re: [Rewrite] Url - rewriting

CactO_o's August 01, 2009 06:53AM

Re: [Rewrite] Url - rewriting

CactO_o's August 05, 2009 01:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 88
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready