Folks,
I am struggling with my Apache rewrite rules. Any help will be appreciated?
=====
What I need?
I want to redirect all requests to the following URL pattern
TO
[B]http://mydomain.com/cms/themes/currenttheme/cache/imagefile-400-590-1.jpg[/B]
ONLY IF the file http://mydomain.com/cms/themes/currenttheme/cache/imagefile-400-590-1.jpg EXISTS.
I tried parametrizing imagefile, jpg, h, w, zc but no avail Please help.
This is the current redirect script that I was able to write influenced by many examples which is obviously not working.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{SCRIPT_FILENAME} thumb\\.php
RewriteCond %{QUERY_STRING} src=http:\\/\\/.*\\..*\\/.*\\/.*\\/(.*)\\.(png|jpe?g)&h=([0-9]+)&w=([0-9]+)&zc=([0-9]+)
RewriteCond %{DOCUMENT_ROOT}/cms/themes/currenttheme/cache/%1-%3-%4-%5.%2 -f
RewriteRule ^.* /cms/themes/currenttheme/cache/%1-%3-%4-%5.%2 [L]
</IfModule>
Any help will be highly appreciated