Force URL link to open with a specific browser

I've created a URL link in my dock, however, the link only opens with the default browser. I have safari, Firefox, and chrome (latest being the default) installed in my machine. I'm wondering if someone knows how to default the link to open with Firefox instead of Chrome but still keeping chrome as the default browser. Note: I'm running Mavericks in my MacBook Pro.


You could use the all powerful open command to achive this using a shell script / apple script. Not necessarily the nicest way, but that's the way I do it.

open http://apple.stackexchange.com -a Firefox.app 

would be the basic command to open this page in Firefox. You can easily wrap this in a nice to use apple script - let me know if you need to know how!


Finicky - Always open the right browser

Is a free and open-source tool for that with a bunch of different settings and rules, it can:

  • Write rules to open urls in any browser
  • Rewrite and replace parts of urls before opening them
  • Automatically resolves the destination url from short url providers

Regarding your direct question, here is settings:

/**
 * Save as ~/.finicky.js
 */
module.exports = {
    defaultBrowser: "Google Chrome",
    handlers: [
        {
            match: finicky.matchHostnames(["your_specific_url_to_open_in_Firefox"]),
            browser: "Firefox"
        }
    ]
};

That's it! Just start this plugin and it will handle all the redirections for you.

For more examples, see the Finicky github page


You can use Choosy and set the rules for the URL you’ve created in Dock. Not only does it work for the URL in the Dock, the rules also apply to all the links you open in Safari, Firefox, or Chrome. If you need a certain domain, or URL patterns to be opened in separate browser, then Choosy is the one you need.


Note: I am about to recommend my app which is available on the Mac App Store. Here is the download link


You can use Linko

Linko dashboard

Features

  • Easy to use hence good for someone who wants to quickly set up a few basic rules
  • Has an inbuilt Rule tester to visualize the rule matching functionality

How is it different from the solutions mentions above?

It is much easy to use as compared to Choosy. Choosy is a powerful tool and is loaded with features. But for someone looking for a simple and easy solution, Linko would be the right tool.

Finicky also does the job well, but few people have mentioned that editing a config file might be cumbersome for some users.

So all in all, Linko is for someone who is looking for a basic and easy interface with no advanced features and no config file to edit.