Welcome! Log In Create A New Profile

Advanced

Re: Rewrite translation apache to nginx

Edho Arief
November 25, 2011 01:18AM
2011/11/25 Цэвээндорж <tseveendorj@gmail.com>:
>
> Hello,
>
> I have always difficulty with rewrite translating apache to nginx.
>
> <IfModule mod_rewrite.c>
>         RewriteEngine On
>         #
>         #  Full path to your site
>         #
>         RewriteBase /
>         # Rename Photo Names
>         RewriteRule
> ^file/pic/photo/([0-9]+)/([0-9]+)/([A-Za-z0-9]{32}+)\-(.*?)([_0-9]*?)\.(.*)$
> file/pic/photo/$1/$2/$3$5.$6

rewrite ^/file/pic/photo/([0-9]+)/([0-9]+)/([A-Za-z0-9]{32}+)\-(.*?)([_0-9]*?)\.(.*)$
/file/pic/photo/$1/$2/$3$5.$6;


>         #
>         #  Rules
>         #
>         RewriteCond %{REQUEST_FILENAME} !-f
>         RewriteCond %{REQUEST_FILENAME} !-d
>         RewriteRule ^(.*) index.php?do=/$1

try_files $uri $uri/ /index.php?do=$uri;

>         # Image Access Protection
>         RewriteRule ^file/pic/photo/(.*)\.(.*)$
> static/image.php?file=$1&ext=$2

rewrite ^/file/pic/photo/(.*)\.(.*)$ /static/image.php?file=$1&ext=$2




--
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Rewrite translation apache to nginx

Eberx November 25, 2011 12:20AM

Re: Rewrite translation apache to nginx

Edho Arief November 25, 2011 01:18AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 46
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