views:

112

answers:

3

I want to hack my browser to redirect from one website to another when I type in a URL.

For example:

When I type "facebook.com" into my Firefox address bar, I want it to redirect to "lite.facebook.com"

Are there configuration files in Firefox that allow me to do this? Almost like a local mod_rewrite?

+1  A: 

It looks like the Greasemonkey plugin for Firefox will let you do this.

For instance, it will let you redirect a page to the equivalent secure version, like so:

window.location.href = window.location.href.replace(/^http:/, 'https:');

aem
A: 

If you're doing more than just changing hosts, and you're using Firefox, you might consider Greasemonkey. It might be a little more than what you're looking for, though.

Joe
A: 

Write a greasemonkey script that does the redirect in javascript.

Ben S