Google Breakdance
6 posts
• Page 1 of 1
- MisterDeveloper
-
- Posts: 6
- Joined: 12 Jan 2013, 09:35
Google Breakdance
Has anyone tried converting the Wordpress.org Google Breakdance to work with Isapi? Its a .htaccess script that prevents uses from using "view original image" thus bypassing the html. People seem to like it but initial attempts to get it to work with Isapi has not worked.
http://wordpress.org/plugins/google-break-dance/
### Awal Redirect ###
RewriteCond %{REQUEST_URI} wp-content/uploads/.*\.(gif|jpg|jpeg|png)$ [NC]
RewriteCond %{HTTP_REFERER} ^http://www.google.[a-z]{2,4}(.[a-z]{2,4})?/url\?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://www.bing.com/images/search?q=\?.*$ [NC]
#RewriteCond %{HTTP_REFERER} ^$ [NC]
#RewriteCond %{HTTP_REFERER} !^http://www.example.com/.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !(.*bot.*|slurp) [NC]
RewriteRule ^(wp-content.*)$ /get_posturl?$1 [R=302,L]
### Akhir Redirect ###
Is there anything I need to change excluding wp-content/uploads/.* which for me will be my pictures directory. Do I need to fully qualify the wp-contents/uploads/*. to be http://www.example.com/pictures/.* ?
http://wordpress.org/plugins/google-break-dance/
### Awal Redirect ###
RewriteCond %{REQUEST_URI} wp-content/uploads/.*\.(gif|jpg|jpeg|png)$ [NC]
RewriteCond %{HTTP_REFERER} ^http://www.google.[a-z]{2,4}(.[a-z]{2,4})?/url\?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://www.bing.com/images/search?q=\?.*$ [NC]
#RewriteCond %{HTTP_REFERER} ^$ [NC]
#RewriteCond %{HTTP_REFERER} !^http://www.example.com/.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !(.*bot.*|slurp) [NC]
RewriteRule ^(wp-content.*)$ /get_posturl?$1 [R=302,L]
### Akhir Redirect ###
Is there anything I need to change excluding wp-content/uploads/.* which for me will be my pictures directory. Do I need to fully qualify the wp-contents/uploads/*. to be http://www.example.com/pictures/.* ?
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Google Breakdance
Hello,
The rule looks fine and should work.
Simply try to add "RewriteEngine on" in the beginning. However, to investigate the problem we'd need to take a look at the logs. The logging issues are described in FAQ - http://www.helicontech.com/forum/forum_ ... -10648.htm
Regards
Andrew
The rule looks fine and should work.
Simply try to add "RewriteEngine on" in the beginning. However, to investigate the problem we'd need to take a look at the logs. The logging issues are described in FAQ - http://www.helicontech.com/forum/forum_ ... -10648.htm
Regards
Andrew
- MisterDeveloper
-
- Posts: 6
- Joined: 12 Jan 2013, 09:35
Re: Google Breakdance
Sadly I don't have access to write log file with it being on a shared server. This is my complete .htaccess file.
RewriteEngine on
RewriteBase /
### Awal Redirect ###
RewriteCond %{REQUEST_URI} ^Pictures/.*\.(gif|jpg|jpeg|png)$ [NC]
RewriteCond %{HTTP_REFERER} ^http://www.google.[a-z]{2,4}(.[a-z]{2,4})?/url\?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https://www.google.[a-z]{2,4}(.[a-z]{2,4})?/url\?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://www.bing.com/images/search?q=\?.*$ [NC]
#RewriteCond %{HTTP_REFERER} ^$ [NC]
#RewriteCond %{HTTP_REFERER} !^http://www.example.com/.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !(.*bot.*|slurp) [NC]
RewriteRule ^(/Pictures.*)$ /get_posturl?$1 [R=302,L]
### Akhir Redirect ###
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.net [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.co.uk [NC]
RewriteRule \.(jpg|jpeg|gif)$ http://www.example.com/Pictures/hotlink.png [NC,R,L]
RewriteRule ^character/catmen.aspx /character/cat.aspx [NC,R=302,L]
RewriteRule ^([.]+)\.php$ $1.aspx?%{QUERY_STRING} [R=301,QSA]
RewriteRule jackal.aspx$ - [F]
# RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
# RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com [NC]
# RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC]
RewriteEngine on
RewriteBase /
### Awal Redirect ###
RewriteCond %{REQUEST_URI} ^Pictures/.*\.(gif|jpg|jpeg|png)$ [NC]
RewriteCond %{HTTP_REFERER} ^http://www.google.[a-z]{2,4}(.[a-z]{2,4})?/url\?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^https://www.google.[a-z]{2,4}(.[a-z]{2,4})?/url\?.*$ [NC,OR]
RewriteCond %{HTTP_REFERER} ^http://www.bing.com/images/search?q=\?.*$ [NC]
#RewriteCond %{HTTP_REFERER} ^$ [NC]
#RewriteCond %{HTTP_REFERER} !^http://www.example.com/.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !(.*bot.*|slurp) [NC]
RewriteRule ^(/Pictures.*)$ /get_posturl?$1 [R=302,L]
### Akhir Redirect ###
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.net [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.co.uk [NC]
RewriteRule \.(jpg|jpeg|gif)$ http://www.example.com/Pictures/hotlink.png [NC,R,L]
RewriteRule ^character/catmen.aspx /character/cat.aspx [NC,R=302,L]
RewriteRule ^([.]+)\.php$ $1.aspx?%{QUERY_STRING} [R=301,QSA]
RewriteRule jackal.aspx$ - [F]
# RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
# RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yahoo.com [NC]
# RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?bing.com [NC]
- MisterDeveloper
-
- Posts: 6
- Joined: 12 Jan 2013, 09:35
Re: Google Breakdance
Yes, the other rules work.
Maybe I'm approaching this wrong, essentially what I probably want to be doing is to redirect the user to a page if the request is a picture with a referer of google and the engine is not googlebot. I took it from a Wordpress.org page.
Can Helicon be used to redirect a browser's page when the referer for an image is google? Obviously so not to get banned, I need to exclude it for webbots.
Maybe I'm approaching this wrong, essentially what I probably want to be doing is to redirect the user to a page if the request is a picture with a referer of google and the engine is not googlebot. I took it from a Wordpress.org page.
Can Helicon be used to redirect a browser's page when the referer for an image is google? Obviously so not to get banned, I need to exclude it for webbots.
- HeliconAndrew
-
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: Google Breakdance
If you cannot get the logs, I'd suggest debugging by commenting out all the conditions and checking if the rule is working in general. Then add one by one the conditions. See which one breaks the scenario.
Regards
Andrew
Regards
Andrew
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 16 guests