Forum Moderators: phranque
www.example.com/testdir/http://i.walmartimages.com/i/p/00/08/52/14/04/0008521404841_215X215.jpg
my site url is:
http://www.example.com/testdir/
the image i'm looking to pass as a variable is:
[i.example2.com...]
Here's what I have so far, but it doesn't seem to work...
RewriteEngine on
RewriteRule ^test1/([a-zA-Z0-9_-]+)$ index.php?sImgUrl=$1
RewriteRule ^test1/([a-zA-Z0-9_-]+)/$ index.php?sImgUrl=$1
RewriteRule ^test1/([http://\A-Za-z0-9\.\_\-/\]+[A-Za-z0-9\.\_\-]+(\.gif¦\.png¦\.jpe?g)+)$index.php?sImgUrl=$1
RewriteRule ^test1/([\A-Za-z0-9\.\_\-/\]+[A-Za-z0-9\.\_\-]+(\.gif¦\.png¦\.jpe?g)+)$ index.php?sImgUrl=$1
[edited by: eelixduppy at 4:20 pm (utc) on Dec. 28, 2009]
[edit reason] exemplified [/edit]
RewriteRule ^test1/([http://\A-Za-z0-9\.\_\-/\]+[A-Za-z0-9\.\_\-]+(\.gif¦\.png¦\.jpe?g)+)$index.php?sImgUrl=$1
Try this instead:
RewriteRule ^test1/(http://([^.]+\.)+(gif¦png¦jpe?g))$ index.php?sImgUrl=$1 [L]
The negative-match-on-periods pattern will speed things up a bit.
Replace all broken pipe "¦" characters above with solid pipes before use; Posting on this forum modifies the pipe characters.
Jim