Reputation: 101
Hello I have this link:
exemple.com/imageget.php?width=351&height=245&image=http://pic.exemple.com/images/marganit/266.jpg
the parameter "image" in
exemple.com/imageget.php
Is dynamic and I need to extract this parameter like this:
http://pic.exemple.com/images/marganit/266.jpg
And redirect the page to
http://pic.exemple.com/marganit/266.jpg
Can someone help me? Thanks!
Upvotes: 0
Views: 38
Reputation: 7476
Try below,
RewriteEngine On
RewriteCond %{QUERY_STRING} ^width=\d+&height=\d+&image=(.*)(/images)(.*)
RewriteRule ^ %1%3? [R=301]
Test it here.
Upvotes: 1