htaccess conversion nginx

Edho Arief edho at myconan.net
Sun Feb 19 12:08:34 UTC 2012


Hello

On Sun, Feb 19, 2012 at 7:02 PM, rooxy <nginx-forum at nginx.us> 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



More information about the nginx mailing list