mager
mager

Reputation: 4863

Local HTTP redirects in the browser

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?

Upvotes: 1

Views: 668

Answers (3)

aem
aem

Reputation: 3916

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:');

Upvotes: 1

Ben S
Ben S

Reputation: 69342

Write a greasemonkey script that does the redirect in javascript.

Upvotes: 0

Joe
Joe

Reputation: 2587

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.

Upvotes: 0

Related Questions