Forum

rewrite rules for wordpress plugin imaguard.

Max
23 July 2014, 17:02
Hello!
I need help in transforming rewrite rules for wordpress plugin imaguard.
.htaccess in wp main directory contains following rules:

###############################
# BEGIN imaguard
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?womojunkie\.com [NC]
RewriteRule ^(.*)\.(jpg|png|jpeg|gif)$ /show-image/?img=/$1.$2 [R=302,NC,L]
# END imaguard

###############################

How should it be written in Hiawatha style?

Thank You!
Hiawatha version:
Operating System:
Max
23 July 2014, 17:03
Hiawatha version:5.6.3
Operating System: centos 6.5
Kloxo-mr
chrisf
23 July 2014, 22:46
If using KloxoMR your hiawatha v is 9.6

Try this, but not tested:
Match ^(.*)\.(jpg|png|jpeg|gif)$ Rewrite /show-image/?img=/$1.$2 Return

Add that to your wordpress UrlToolkit
chrisf
23 July 2014, 22:48
You may need the '/' after the carat....

Match ^/(.*)\.(jpg|png|jpeg|gif)$ Rewrite /show-image/?img=/$1.$2 Return
Hugo Leisink
31 July 2014, 08:45
UrlToolkit {
ToolkitID = some_id
Header Referer ^http://(.+\.)?womojunkie\.com Return
Match ^/(.*)\.(jpg|png|jpeg|gif)$ Rewrite /show-image/?img=/$1.$2
}


Be carefull with the 'Header Referer' line. Not every browser sets the Referer HTTP header. Specially not the ones with a privacy-plugin which hides that header.
This topic has been closed.