Also, I would like to allow google and yahoo to crawl my css and js files. But is this a user-agent issue or is it a referer issue ? If so, can I mix referer issues and user-agent issues in the follow code ?
I am also open to other suggestions (adding more lines to the following code) ...
brolly wrote:I would like to find out how can I exclude the w3c css validator (http://jigsaw.w3.org/css-validator/vali ... ysite.com/) from my hotlink bans. As you can see I placed w3\.org but it still is banned. Why ?
Why would you want to do so? People can still use the Firefox Web Developer plugin by using the "Send local CSS to Validator" function, so its not preventing validation.
Further, validation of your css is a GOOD thing, not a bad thing. If you've got errors in your css, why don't you ask for help fixing them?
I'm not sure I understood. I have a button on my site where if you click on it, that page's css file is validated but since my .htaccess file doesn't allow hot linking for css files, the validator does not work. So I would like to ban access to css files to everybody except the w3c validator.
brolly wrote:I have a button on my site where if you click on it, that page's css file is validated but since my .htaccess file doesn't allow hot linking for css files, the validator does not work. So I would like to ban access to css files to everybody except the w3c validator.
I just directed the validator to one of my sites and in the log file there was no referrer ("-").
This was given for the User-Agent: "Jigsaw/2.2.5 W3C_CSS_Validator_JFouffa/2.0"
Try allowing "Jigsaw" as a user-agent and see what happens.
From looking at my logs it appears that Google visits have an empty referer. I'm going to guess that Yahoo and MSN do the same. It makes sense. They visit a site and get a list of links. Later they directly request those links and no referrer is involved.