2

As the title says, was curious if it's possible and how? Thanks! :)

5
  • Short answer: Maybe. There would be ways around any such block (spoofing the user agent for example). How is too broad a question.
    – DavidPostill
    Oct 13, 2015 at 8:31
  • Only allow Firefox to connect? No. Firefox is an HTTP client; any HTTP client can connect to your server (or, indeed, any TCP client that can send and receive plain text; I regularly connect to web servers with tools like netcat that are just TCP clients and I do the HTTP myself). You can add user-agent header filtering, but anybody who wants to can spoof Firefox in the UA header and bypass that. You might be able to make it so any browser except Firefox will fail to render the page correctly, but it would still be possible to read the content in the page source.
    – CBHacking
    Oct 13, 2015 at 8:32
  • @CBHacking Ohh, can you give an example of user-agent filtering? Curious to see how it would look like! :)
    – Exid
    Oct 13, 2015 at 8:38
  • 1
    This should be on webmasters.stackexchange.com
    – Chenmunka
    Oct 13, 2015 at 10:10

1 Answer 1

1

I search a bit and wrote this in .htaccess (not sure if it's 100% right but seems to work)

RewriteEngine On RewriteCond %{HTTP_USER_AGENT} !Firefox* [NC] RewriteRule ^ - [F,L]

2
  • There are various browser detection techniques based on the specified user-agent, but note that the user agent can be arbitrary modified by the user/app, is not a secure detection. Oct 13, 2015 at 9:00
  • It is a trivial task to indicate the user agent is Firefox using pretty much any major browser .
    – Ramhound
    Oct 13, 2015 at 10:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .