dubstep
#1
hi nginx family,
RewriteEngine On
RewriteRule ^([0-9a-zA-Z]{1,6})$ links/?to=$1 [L]
RewriteRule ^([0-9]{1,9})/banner/(.)$ links/?uid=$1&adt=2&url=$2 [L]
RewriteRule ^([0-9]{1,9})/(.)$ links/?uid=$1&adt=1&url=$2 [L]
help me.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,222634,222634#msg-222634
rooxy
#2
Hello
On Sun, Feb 19, 2012 at 7:02 PM, rooxy [email protected] wrote:
hi nginx family,
RewriteEngine On
RewriteRule ^([0-9a-zA-Z]{1,6})$ links/?to=$1 [L]
RewriteRule ^([0-9]{1,9})/banner/(.)$ links/?uid=$1&adt=2&url=$2 [L]
RewriteRule ^([0-9]{1,9})/(.)$ links/?uid=$1&adt=1&url=$2 [L]
help me.
Looks simple enough. Try this one:
rewrite ^/([0-9a-zA-Z]{1,6})$ /links/?to=$1 last;
rewrite ^/([0-9]{1,9})/banner/(.)$ /links/?uid=$1&adt=2&url=$2 last;
rewrite ^/([0-9]{1,9})/(.)$ /links/?uid=$1&adt=1&url=$2 last;
–
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
rooxy
#3
Thank you for your help,
nginx: [emerg] directive “rewrite” is not terminated by “;” in
/usr/local/nginx/
this get the error.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,222634,222637#msg-222637
rooxy
#4
On Sun, Feb 19, 2012 at 7:18 PM, rooxy [email protected] wrote:
Thank you for your help,
nginx: [emerg] directive “rewrite” is not terminated by “;” in
/usr/local/nginx/
this get the error.
I suggest using brain.
–
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
rooxy
#5
On Sun, Feb 19, 2012 at 7:29 PM, rooxy [email protected] wrote:
Thank you for the suggestion,
{1,6} here does not accept.
Yeah, I missed something.
The answer is here http://wiki.nginx.org/HttpRewriteModule
–
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
rooxy
#6
rooxy
#7
On 19 February 2012 15:18, rooxy [email protected] wrote:
nginx: [emerg] directive “rewrite” is not terminated by “;” in
/usr/local/nginx/
Whenever ‘{’ and ‘}’ appear in a rewrite, the rewrite must be enclosed
in quotation marks.
So change the rewrites to …
rewrite ‘^/([0-9a-zA-Z]{1,6})$’ /links/?to=$1 last;
rewrite ‘^/([0-9]{1,9})/banner/(.)$’ /links/?uid=$1&adt=2&url=$2 last;
rewrite '^/([0-9]{1,9})/(.)$’ /links/?uid=$1&adt=1&url=$2 last;
rooxy
#8
rooxy
#9
On 20 February 2012 00:15, rooxy [email protected] wrote:
did not 
Did not what?
Did you reload Nginx?
What error message did you get if any?
You need to give information about your issue.
rooxy
#10
Thank you for the suggestion,
{1,6} here does not accept.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,222634,222641#msg-222641
rooxy
#11
On 19 Fev 2012 20h43 WET, [email protected] wrote:
What should I do ?
Try:
location ~ “^/([0-9a-zA-Z]{1,6})$” {
return 302 /links/?to=$1;
}
location ~ “^/([0-9]{1,9})/banner/(.*)$” {
return 302 /links/?uid=$1&adt=2&url=$2;
}
location ~ “^/([0-9]{1,9})/(.*)$” {
return 302 /links/?uid=$1&adt=1&url=$2;
}
— appa