Welcome! Log In Create A New Profile

Advanced

Apache mod_rewrite to Nginx once again.

Posted by tycjan 
Apache mod_rewrite to Nginx once again.
October 19, 2010 02:08PM
Hello.

Last time i decided to change my webserver to nginx. Almost all works fine from the begining. Yeah mod_rewrite. I have my own .htaccess file under apache
--
[code]
RewriteRule ^media/_cache/_w_a([a-z0-9_]+).jpg$ library/thumb/phpThumb.php?src=../../media/_cache/a$1.jpg&q=90&fltr[]=gray&fltr[]=wmi|../../media/_cache/_watermark.png|BR [L]
RewriteRule ^media/_cache/_w_g([a-z0-9_]+).jpg$ library/thumb/phpThumb.php?src=../../media/_cache/g$1.jpg&q=90&fltr[]=gray&fltr[]=wmi|../../media/_cache/_watermark.png|B [L]
[/code]



--
After migration i change this rules to:

-
[code]
rewrite ^/media/_cache/_w_a([a-z0-9_]+).jpg$ /library/thumb/phpThumb.php?src=../../media/_cache/a$1.jpg&q=90&fltr[]=gray&fltr[]=wmi|../../media/_cache/_watermark.png%7CBR last;
rewrite ^/media/_cache/_w_g([a-z0-9_]+).jpg$ /library/thumb/phpThumb.php?src=../../media/_cache/g$1.jpg&q=90&fltr[]=gray&fltr[]=wmi|../../media/_cache/_watermark.png%7CB last;
rewrite ^/(media.*\.(jpg|jpeg|png|gif))$ /library/thumb/phpThumb.php?src=../../$1&fltr[]=gray last;
rewrite ^/media/_cache/_w_a([a-z0-9_]+).jpg$ /library/thumb/phpThumb.php?src=../../media/_cache/a$1.jpg&q=90&fltr[]=wmi|../../media/_cache/_watermark.png%7CBR last;
rewrite ^/media/_cache/_w_g([a-z0-9_]+).jpg$ /library/thumb/phpThumb.php?src=../../media/_cache/g$1.jpg&q=90&fltr[]=wmi|../../media/_cache/_watermark.png%7CB last;
[/code]


But it does not work for me becouse images are not displayed... any ideas?
Re: Apache mod_rewrite to Nginx once again.
October 25, 2010 07:28AM
I found out that these rules are parameters to be passed to the script. I tried to configure nginx as reverse proxy for apache with mod_rewrite but these rules still does not work for me.Maybe anyone would like to help me? I am able to paste all my configuration files if needed.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

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