Closed Thread Icon

Topic awaiting preservation: blocking certain browsers via .htaccess (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12178" title="Pages that link to Topic awaiting preservation: blocking certain browsers via .htaccess (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: blocking certain browsers via .htaccess <span class="small">(Page 1 of 1)</span>\

 
sonic_tsunami
Bipolar (III) Inmate

From: some evil place, the evil little atoll
Insane since: Jan 2002

posted posted 04-15-2002 22:31

I wanna block opera (since this asshole is using opera's timed refresh option)
how can I block that?

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 04-15-2002 22:44

I'm not sure if it is possible to do that using .htaccess but you could just use PHP, for example, to detect the browser and redirect them to another page - I would say doing this is unwise but it is your call.

Emps

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 04-15-2002 22:47

You can do that by using mod_rewrite Apache module...




[This message has been edited by mr.maX (edited 04-15-2002).]

sonic_tsunami
Bipolar (III) Inmate

From: some evil place, the evil little atoll
Insane since: Jan 2002

posted posted 04-15-2002 23:06

I have had like one opera user before this clown..
what's the php code then?

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 04-16-2002 02:54

Browser detection:
www.ozoneasylum.com/Forum8/HTML/000183.html

then redirect using:
www.php.net/header

That should be enough to do the job. I must admit I'd be more tempted to try and pop a message up on the site asking him not to or see if I couldn't block him by his IP or ... Anyone got any better/neater solutions?

Emps

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 04-16-2002 07:15

As I've said mod_rewrite can be used to do this. Simply put the following code in your .htaccess file and everyone who uses Opera will get a "403 Forbidden" error message, when they try to access anything (html pages, images, etc.):

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} .*Opera.*
RewriteRule .+ - [F]


sonic_tsunami
Bipolar (III) Inmate

From: some evil place, the evil little atoll
Insane since: Jan 2002

posted posted 04-19-2002 04:45

I dont think my server has mod rewrite --;

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 04-19-2002 07:51

Well, most web hosts have it installed. You can try to ask your web host to install it - maybe they will...


stinx
Bipolar (III) Inmate

From: London, UK
Insane since: Apr 2002

posted posted 04-19-2002 15:42

There's another apache directive you can play with called SetEnvIf
http://httpd.apache.org/docs/mod/mod_setenvif.html

Again, it needs a module installed (mod_setenvif), so good luck finding out - but taking a cursory glance at one of the boxes here, it appears to be a standard installed module for apache.

stinx


« BackwardsOnwards »

Show Forum Drop Down Menu