views:

6

answers:

0

Hello guys, I'm porting the rewrite rules of shimmie2 to nginx and ran across a problem: From the first impression it worked quite well, but when you try to view the image (I mean via right-click menu in your browser) you end up with stuff like this, instead the original image:

ÿØÿà�JFIF��H�H��ÿÛ�C�

ÿÛ�CÿÀ���À�ÿÄ�����������
�ÿÄ�B�����!1"AQaq#2B‘ 3Rbr¡±C‚Á¢Ñðñ$Ss„ÂÿÄ������������ ÿÄ�A� ����!1AQaq‘"2¡±ÁÑðBá#ñRb¢$%r²34c‚’ÂÿÚ���?�å~%9 ³éŒÉÎêŽãÓ$I–’y@ÄgʤGTI–ÞÐ6¢þ˜ŠéJ”ȲÉoX¦4nØLG‘Å>Ø–k”˜ëmm¸ÂÚ’R°G,!²˜)E€ê—mEÍ•,\v¢È«Òäîøip$À°GÞ·çƒL*fÕ7£†¿t‰Dêwe›NŸd¼j+RžèÍW#4äƒ,‰QÍö¶§þîýH�¤R,°éƒ¢sÙÔ% ¶"ÙšÇ翽0LéÊ3nÊÉíÈ€ôt¶ó°®–ø(±¿¯[tßOă-Úg}þ*ù˜qqõ2¶ËB챬™E¬DËÙ~—œË¸¥F—¶ÊJCŸx¸®¶è”üñ~)¤¦x/q%\RpUcØÀ� ÓK“ûɉ¤F¿+«¡Ôߌ©”I(H[%ag|WÍ‘~EÇÝW‘ à>¿ŽÃêضì¸D”\æÀÖÈ}q§ÙGyR…&æÆk0š”Ã)qqêm<½Ä�v©IóðØ“ÐXƒÉñØ—j;7èt+ÚŒÆÙ|µdÿ�Щ}¶\KiR·Qkâ¹ê;ÑJôºîÑf’M¹6ÄW'ÚÓe!Ò¨I²OrzŽ0Ó€ºX¾ÊH§Pá%¡–6ЧZ.¤ZMY#ºH>ãå æ´ì©Ô$mf>£ ˜Æ–R�(æ´¥e6·¦-mÒ»C²+‹Dl }˜ôa$˜^VØЛ)d“ôÇÁ¤v‡ªü]°/Ý"ÿ�ËCBO;·ZÉT÷²Oå‡,„• CnÊHi7ùaa£¢ð¸”)2„¦ì˦Ð-šO1\¦ÄŒ

These are the orginal rewrite rules:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?q=$1&%{QUERY_STRING} [L]
RewriteRule ^_images/([0-9a-f]{2})([0-9a-f]{30}).*$  images/$1/$1$2 [L]
RewriteRule ^_thumbs/([0-9a-f]{2})([0-9a-f]{30}).*$  thumbs/$1/$1$2 [L]

and these the ones I created:

rewrite "^/_thumbs/([0-9a-f]{2})([0-9a-f]{30}).*$" /thumbs/$1/$1$2 last;

rewrite "^/_images/([0-9a-f]{2})([0-9a-f]{30}).*$" /images/$1/$1$2 last;

if (!-e $request_filename) { rewrite ^/(.*)$ /index.php?q=$1&$query_string last; }

Where is my fault? Thank you in advance