Hi,
Can you email a link to your blog to admin@imaguard.com? Also it would be great if you could email us the entire content of your .htaccess file in your wp root folder.
Please also let us know what version of WP you are running.
Try sending it again – you probably sent it to admin@imaguar.com instead of admin@imaguard.com which was what I first types and then I edited the post. You are very quick π
lol i did i realized myself
Got it now! There are no imaguard entries in your htaccess file. Even if you have disabled it, there should be a blank section marked imaguard.
For one reason or another your htaccess file has not been amended. Try to reactivate imaguard and keep attention to the top of the plugin page after it refreshes after activation for error messages. Then go to the imaguard settings. You may be getting an error that Imaguard could not write to your htaccess file.
Then before deactivating imaguard, send us the htaccess text again so we can check it while the plugin is active.
You have a very complicated htaccess file with cache plugins overriding all image settings and forcing cache on these. Cache doesn’t work well with Imaguard since it redirects / watermarks on the fly. But we’ll try to figure it out.
ok reactivated plugin now, still 404 errors and no overlay, sent email with htacess
Had a look at it. You were missing all linebreaks in the Imaguard section.
Could you activate it again, then go into your htaccess file and replace the imaguard section manually with this:
# BEGIN imaguard
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+\.)? [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?youtube\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?facebook\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?twitter\.com [NC]
RewriteRule ^(.*)\.(jpg|png|jpeg|gif)$ /show-image/?img=/$1.$2 [R=302,NC,L]
# END imaguard
Then deactivate your cache plugin and see if it works. If it does, we are at least one step further.
ok that code is exactly same as i have in my htacess i think linebreaks got eaten in email
w3total cache is disabled my htacess looks now like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
# BEGIN imaguard
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^http://(.+\.)? [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?youtube\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?facebook\.com [NC]
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?twitter\.com [NC]
RewriteRule ^(.*)\.(jpg|png|jpeg|gif)$ /show-image/?img=/$1.$2 [R=302,NC,L]
# END imaguard
Ok, I’ve had a look. You can turn the plugin off for now. Give me a few minutes to go through the info I noted.
The 404 problem is being caused by the permanent redirect you have in your root folder. If you change this line
$rules[] = 'RewriteRule ^(.*)\.(jpg|png|jpeg|gif)$ /show-image/?img=/$1.$2 [R=301,NC,L]';
in index.php to
$rules[] = 'RewriteRule ^(.*)\.(jpg|png|jpeg|gif)$ /blog/show-image/?img=/$1.$2 [R=301,NC,L]';
it should fix the 404 error.
You may want to consider changing your redirect in your root folder to a more dynamic one at a later stage so that
yoursite.com/this/that
gets redirected to yoursite.com/blog/this/that. But as I said, the above should work for now.
i think you meant htacess file
oh i have now internal server error π
No, but I was unclear. I meant the plugin index.php file:
wp-content/plugins/imaguard/index.php
Change that line and the htaccess file should come out right, though if you download an update of the plugin later, you may have to amend again.
Sorry for the imprecise reference.
>oh i have now internal server error π
Yup, try to remove everything in the imaguard section on your htaccess file, change plugin index.php and reactivate and it should generate again.
You are just too fast for me to keep up with replies π
Thank you for your help
i managed to edit htacess manually,
seems to work now but it takes a while to put overlay over image why is that ?
Also i know it is going a bit too far but could you give me a general idea how to make a dynamic redirection as you mentioned?