Log in

View Full Version : Blocking PSP's from sites


smutpimp
2007-05-24, 08:17 PM
Does anyone know how I can block Sony PSP's from my site. I've noticed from my server logs that I'm getting a lot of hits from them and for obvious reasons I'd like to stop it. Anything I can add to htaccess would be great. Thanks

sabin
2007-05-25, 12:43 AM
i think the user-agent for PSPs is "http_x_psp_browser" but you could block any "psp" to be safe. I'm assuming you know how to do that with your .htaccess

smutpimp
2007-05-25, 11:18 PM
Actually Sabin, no, I don't know what to add to the htaccess file. the User-Agent string is "Mozilla/4.0 (PSP (PlayStation Portable); 2.00)"

ClickBuster
2007-05-26, 10:28 AM
I *think* this should do the trick, but I'm not 100% certain as I copy/pasted and modified the code that I grabbed on another site, tho it looks fine and it seems it *should* work.


RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_user_agent} http_x_psp_browser
RewriteRule ^$ http://www.google.com


This saved in the .htacces file in the site's / folder should take care to redirect PSPs to Google

smutpimp
2007-05-26, 10:55 AM
|thumb Cheers ClickBuster, I'll try it out

Kappi
2007-05-27, 06:36 AM
I wouldn't send the traffic to google though, build a psp page and redirect it there.

SmithsMedia
2007-05-29, 08:38 AM
Does anyone know how I can block Sony PSP's from my site. I've noticed from my server logs that I'm getting a lot of hits from them and for obvious reasons I'd like to stop it. Anything I can add to htaccess would be great. Thanks

Just a thought, if you can redirect them send them to Strictly Broadband UK PSP movies sections ;)