how to strip string from url using rewrite rule
- by Alaa Alomari
sometimes my drupal site add extra string to image url which causes the image to be broken.
the url is
http://mysite.com/sites/default/files/imagecache/list_image_page/%252Fsites/default/files/img.jpg
what is the needed rewrite rule to strip the bolded (%252F) part in the above link
ie. to be:
http://mysite.com/sites/default/files/imagecache/list_image_page/sites/default/files/img.jpg
I have tried this, but didn't work
RewriteCond %{QUERY_STRING} ^(.*)\%252Fsites(.*)$
RewriteRule %{REQUEST_URI} %1sites%2