downthemall/anticontainer — Issue #43: Plugin Help
Author: Kmon
Created: 2011-12-12 20:21:41+00:00
State: open

I have a site that uses the following convention:
Gallery Page: http://hq-celebrity.com/super-sexy-irina-shayk-on-the-runway-in-mexico/
Picture Pages: http://hq-celebrity.com/photos/irina-shayk-2011-11-29/irina-shayk-6, http://hq-celebrity.com/photos/irina-shayk-2011-11-29/irina-shayk-7,http://hq-celebrity.com/photos/irina-shayk-2011-11-29/irina-shayk-1, etc.
Image Link: http://hq-celebrity.com/photos/irina-shayk-2011-11-29/irina-shayk-6.jpg

So the picture page and the actual image link are almost the same save that the image has the proper extension on it. I have been trying to create a redirector plugin that just adds ".jpg" to the end of the URL but I can't seem to get it working. I suspect that because the 2 URLs are basically the same that AC is re-matching it. Is there someway to do this?

Here's my plugin:

{{{
"type": "redirector",
"ns": "krohn.ky",
"author": "kmon",
"prefix": "hq-celebrity.com",
"match": "^http://hq-celebrity\\.com/photos/",
"static": true,
"pattern": "(.*)",
"replacement": "http://$1\.jpg"
}}}