Forum Moderators: phranque
...in an <iframe>, and looked at them as a "webpage", and was afraid of it being thought of as duplicate content with the page with the <iframe>
So I set about to only let the scripts being called from my own Ip address and my server address.
So this seems to be working...
RewriteCond %{HTTP_REFERER} !mydomain\.com/directory/ [NC]I would call this a textbook case of when [NC] is not appropriate. Since it's your own site, you know the correct casing and can use it. (Why does it matter? Because [NC] doubles the server's workload: mydomain\.com/directory/ [NC] = [Mm][Yy][Dd][Oo] character by character, et cetera, you get the idea.)
RewriteRule ^ - [F,L]You don't technically need the [L] flag here, because [F] carries an implied L. It does no harm, but why not save the two bytes ;)
Before using PHP ala wordpress... my regular HTML pages that called the scripts with SSI...
the page was treated as one page, not a page, and a script, in the index.... it's the iframe (now) that google is segregating the two.
<?php
include('http://example.com/cgi-bin/dogseatpoo.cgi');
In my little htaccess file... if I don't include my personal Ip address, than I can't see (ie 403 error) the script just by trying to get it from an url.. ie website/cgi-bin/dogseatpoo.cgi . But if I go to the webpage that has the script in the iframe.. all is good.
I'm not clear how this is working? Isn't your CGI-script the SRC of the IFRAME? If it is then it would be the client/user making the request - so they would be blocked as well? No?
<?php include('http://example.com/cgi-bin/dogseatpoo.cgi') ?>