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:
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:
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
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:
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
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 Module ngx_http_rewrite_module
–
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
What should I do ?
Posted at Nginx Forum:
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;
So change the rewrites to …
[email protected]
nginx Info Page
did not ![]()
Posted at Nginx Forum:
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.
Thank you for the suggestion,
{1,6} here does not accept.
Posted at Nginx Forum:
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs