Please help, how to convert such Nginx rewrite into OpenLiteSpeed rules?

#1
Now I have an Nginx rewrite rule that cannot be successfully transferred to OpenLiteSpeed for use. Please help:

NGINX:
rewrite ^/timthumb/w_([0-9]+)/h_([0-9]+)/q_([0-9]+)/zc_([0-9])/a_([a-z]+)/([0-9A-Za-z_\-]+)\.([0-9a-z]+)$ /wp-content/themes/wordpress-theme-puock-2.7.0/timthumb.php?w=$1&h=$2&q=$3&zc=$4&a=$5&src=$6;
What I converted is:

Apache config:
RewriteEngine   On
RewriteRule "^/timthumb/w_([0-9]+)/h_([0-9]+)/q_([0-9]+)/zc_([0-9])/a_([a-z]+)/([0-9A-Za-z_\-]+)\.([0-9a-z]+)$" "/wp-content/themes/wordpress-theme-puock-2.7.0/timthumb.php?w=$1&h=$2&q=$3&zc=$4&a=$5&src=$6" [R]
But it was completely unsuccessful. Please help me. I have been struggling for a long time!
 

Cold-Egg

Administrator
#2
Try to remove the first slash and let us know if it works.
Code:
RewriteRule "^timthumb/w_([0-9]+)/h_([0-9]+)/q_([0-9]+)/zc_([0-9])/a_([a-z]+)/([0-9A-Za-z_\-]+)\.([0-9a-z]+)$" "/wp-content/themes/wordpress-theme-puock-2.7.0/timthumb.php?w=$1&h=$2&q=$3&zc=$4&a=$5&src=$6" [R]
 
#8
No, although the test passed, the actual generated URL is still dynamic, not the pure one I want, and ends with a static link with the image format extension!
 
#10
Yes, I am under Nginx, and the rewrite rules are:

NGINX:
rewrite ^/timthumb/([0-9A-Za-z]+)/w/([0-9]+)/h/([0-9]+)/q/([0-9]+)/zc/([0-9])/a/([a-z]+)/spm/([0-9A-Za-z]+)\.([0-9a-z]+)$ /wp-content/themes/dragon/functions/timthumb.php?src=$1&w=$2&h=$3&q=$4&zc=$5&a=$6&spm=$7;
The goals are:

HTML:
https://www.imydl.com/timthumb/aHR0cHM6Ly93d3cuaW15ZGwuY29tL3dwLWNvbnRlbnQvdXBsb2Fkcy8yMDI0LzA0L09MUy5qcGc/w/375/h/250/q/70/zc/1/a/c/spm/3d5bae105bafc579c7d66c34709acf0c.jpg
 

Cold-Egg

Administrator
#11
I felt the resulting URL is expected based on the rewriterule. If you input the same URL, does the Nginx site redirect you to a static image file, and OLS does not? It should be handled by that PHP file though.
 
Top