MozillaZine

[Ext] NoRedirect 1.3.2: Take control of HTTP redirects

Announce and Discuss the Latest Theme and Extension Releases.
kliu0x52

User avatar
 
Posts: 569
Joined: October 18th, 2006, 2:23 pm
Location: .us

Post Posted May 4th, 2009, 12:29 pm

NoRedirect
  • Synopsis: Highly configurable extension that lets the user take control of HTTP redirects; can be used to interdict DNS error search hijacks and "smart" error pages and to screen "shortened" URLs.
  • Homepage: author's homepage
  • Current Version: 1.3.2 (history)
  • Compatibility: Firefox 3.0–4.0, SeaMonkey 2.0–2.1
  • Download: addons.mozilla.org

Examples of Usage

Stopping DNS error redirects

The original impetus for NoRedirect came from my frustration over Verizon's search service, for which opting out was not always possible. Every time I hit a DNS error—by mistyping an address, clicking on a link with a typo, leaving off a letter when copying and pasting, etc.—I would be redirected to Verizon's "helpful" search page, which meant that, if I wanted to fix my typo, I had to retype the entire address.

Such user-hostile services are now employed by virtually all major ISPs and even some domain registries—many users have experienced the frustration of being redirected after typing ".com" as ".cm". In addition to suppressing such redirects, NoRedirect will also restore the browser's native behavior: the browser will display its built-in DNS error message, and the browser's keyword search feature, if enabled, will be protected from interference caused by these DNS hijacks.
Image


Previewing/screening "shortened" URLs

Among the problems of URL shortening services is not being able to tell where a URL leads until it is too late. While some services offer "previews" if you set a cookie, not all services offer this feature. By blocking redirects originating from known URL shortening services, NoRedirect can be configured to act as a gatekeeper to make sure that all redirection service URLs are screened.
Image


Stopping "smart" error pages

There are some sites that, instead of displaying a standard error page, will redirect you to the site's main page or to a "smart" error page. More often than not, these measures, instead of being helpful, just end up disrupting the user's browsing experience, making it difficult to fix simple errors such as typos or the leaving off of a few characters when copying and pasting an address. NoRedirect can be configured to stop such nuisances.
Image



Configuration


NoRedirect operates using a customizable list of rules. You can block redirects based on their source (useful for screening redirection services) or destination (useful for stopping DNS error hijacks). The flexibility of the rule system makes it possible to exercise both coarse and fine-grained control. For example, you could treat the rule list as a simple blacklist, or you could treat the rule list as a simple whitelist by placing various allow rules above a wildcard block rule, or you could cook up you own scheme, such as creating a set of rules to block all redirects except for those that end in an image file extension or those that originate from example.org
Image
Last edited by kliu0x52 on March 27th, 2011, 11:41 pm, edited 12 times in total.
My addons: NoRedirect | QuickDrag | URL Flipper | TabSubmit
Developers: Make sure to test your addons for RTL compatibility!

kliu0x52

User avatar
 
Posts: 569
Joined: October 18th, 2006, 2:23 pm
Location: .us

Post Posted May 4th, 2009, 12:33 pm

If you like NoRedirect, here is how you can help:
  • Posting a review on NoRedirect's AMO page so that it can be unsandboxed.
  • If you have a URL pattern that you have blocked and that you think would make a good addition to the default block list (every user can of course customize the list), please feel free to share it.
My addons: NoRedirect | QuickDrag | URL Flipper | TabSubmit
Developers: Make sure to test your addons for RTL compatibility!

kliu0x52

User avatar
 
Posts: 569
Joined: October 18th, 2006, 2:23 pm
Location: .us

Post Posted May 7th, 2009, 11:30 pm

Updated to 1.2.0; whitelisting is now possible, meta refresh redirects are also caught

2009/05/07 - 1.2.0
  • [Bug #156] Add an allow bit to rules so that a whitelisting behavior would be possible when coupled with the use of wildcard block rules.
  • [Bug #157] Refresh redirects, set either in a META tag or in the HTTP headers, can now be stopped.
  • [Bug #158] Code reorganization so that the NoRedirect service can be used by other extensions (e.g., URL Flipper).

2009/05/05 - 1.1.1
  • [Bug #155] Changed the styling of the destination link in the blocked redirect banner so that it looks more like a link.

2009/05/04 - 1.1.0
  • [Bug #150] Users can now specify interdiction rules that are based on source URL patterns.
  • [Bug #154] Fixed a bug that prevented the redirect banner for non-DNS-error interdictions from being shown in Firefox 2.
My addons: NoRedirect | QuickDrag | URL Flipper | TabSubmit
Developers: Make sure to test your addons for RTL compatibility!

kliu0x52

User avatar
 
Posts: 569
Joined: October 18th, 2006, 2:23 pm
Location: .us

Post Posted May 15th, 2009, 9:23 pm

2009/05/20 - 1.2.1, 1.2.2, 1.2.3, and 1.2.4
  • [Bug #159] Fixed a problem with the rule list editor where the textbox focus would not travel with the selection if the user changes the selection using keyboard navigation.
  • [Bug #160] Minor update to the default rule list.
  • [Bug #168, #172] Added de-DE, es-ES, ja-JP, pt-BR and ru-RU translations from BabelZilla.
  • [Bug #169] Added a link to the rule list editor to the Tools menu.
  • [Bug #171] Overhauled the code to emulate DNS errors; in addition to resolving a few minor issues, this will protect and preserve the browser's built-in keyword search function, if enabled, from interference by DNS hijacks (including those used by OpenDNS).
  • [Bug #175] Improved usability for users who use whitelisting instead of blacklisting by automatically exempting non-document requests.
My addons: NoRedirect | QuickDrag | URL Flipper | TabSubmit
Developers: Make sure to test your addons for RTL compatibility!

tz1
 
Posts: 5
Joined: June 17th, 2004, 9:03 am

Post Posted August 5th, 2009, 10:31 am

I don't think there is currently a way of doing this, but it would help if it would allow matching sites through, e.g. redirecting http://www.this.com/abcd.html to http://www.this.com/wxyz.html would be allowed, but not to http://www.that.com. Most of the annoying redirects change the site. (I'm not sure about something like forum.this.com to http://www.this.com or such, but perhaps there is a way to just add a detailed source-destination URL matching).

It would also help to just have a "save all to history", so the redirects would be allowed, but you could go back using the back button or find the original in the history. The main problem with most of these redirection things is that they zap the current URL so there is no way to recover it.

(EDIT) The reason you would need something like history is for bounce pages like some wifi networks use. Instead of going to www.this.com, you get a login, agree not to do bad things, or some other page which you must click through to get any access at all. So I have to allow www.this.com to get to www.letmethroughform.com, click Agree, wait, then go back in history to www.this.com which should not be redirected this time.

spd347
 
Posts: 1
Joined: August 23rd, 2009, 3:41 am

Post Posted August 23rd, 2009, 3:53 am

I installed this add-on to be able to stop redirecting for example, google.com taking me to google.ru, or some other sites that have several languages. (Another example alawar.com taking me to alawar.ru). It seems that those sites do it based on IP address because I can access the sites I want through an anonymous proxy. It seems that NoRedirect doesn't fix this problem... Is it possible to have this add-on do it? Or maybe any suggestions how to fix this?

Thanks in advance!

tz1
 
Posts: 5
Joined: June 17th, 2004, 9:03 am

Post Posted August 28th, 2009, 9:01 am

I take it that the rules are such that the first matching one wins? I.e. whitelists require a block-all rule or rules (one for source, one for target) at the bottom, and more specific allow rules at the top?

What is the form of the logic? First allow rule wins? First matching rule wins?

(e.g. if there is a rule blocking example.com, and another rule blocking all images, what will happen to a URL with an image from example.com, and does it depend on the order)

Some examples or sample white/blacklists with a few words of explanation would be very helpful.

Spurred_On

User avatar
 
Posts: 66
Joined: September 18th, 2005, 7:01 pm
Location: Jackson Hole, Wyoming

Post Posted November 6th, 2009, 9:02 am

As your reason for creating this extension was frustration with Verizon's redirect, I was surprised that the Verizon redirect URL wasn't one of your preinstalled "Rude List" items. I live in Wyoming and subscribe to a cable service which does not redirect, so when visiting my girlfriend in Boston who uses the Verizon DSL service, I was surprised and angered to find myself being redirected. Using your extension and adding http://www22.verizon.com to the "Rude List" solved the problem. (I tested it before and after the addition to the "Rude List" using the mistyped URL http://www.verizan.com. Without http://www22.verizon.com added to the list, Firefox was redirected to Verizon's "smart page". With http://www22.verizon.com added to the list, no redirect. Your extension works great!

hako2

User avatar
 
Posts: 35
Joined: July 30th, 2005, 9:57 pm
Location: Shanghai, China

Post Posted January 2nd, 2010, 8:21 am

would be nice if it would work with Seamonkey 2...
Any update possible?
"Never do anything against conscience, even if the state demands it"
Albert Einstein

Spurred_On

User avatar
 
Posts: 66
Joined: September 18th, 2005, 7:01 pm
Location: Jackson Hole, Wyoming

Post Posted January 3rd, 2010, 8:42 am

Howdy hako2 — I don't use SeaMonkey, so I'm not sure how different the browser component of SeaMonkey is than Firefox. NoRedirect has continued to work fine for me with Firefox 3.5.6. The NoRedirect homepage http://code.kliu.org/noredirect/ says that the version is compatible with SeaMonkey 2. Perhaps someone who is more familiar with how to tweak NoRedirect in SeaMonkey can give you more help.

kliu0x52

User avatar
 
Posts: 569
Joined: October 18th, 2006, 2:23 pm
Location: .us

Post Posted March 5th, 2011, 3:15 pm

Updated for Fx4 and SM2.1 compatibility.

There is also a new feature, disabled by default, to ensure that redirects that are not interdicted show up in the session history (so there is an easily accessible record and trail of redirects). Detail are in bug #223.
My addons: NoRedirect | QuickDrag | URL Flipper | TabSubmit
Developers: Make sure to test your addons for RTL compatibility!

Ronv777
New Member
 
Posts: 1
Joined: May 3rd, 2011, 4:53 am

Post Posted May 3rd, 2011, 4:59 am

I just downloaded NoRedirects and my first question is: What is the ^ (caret) at the beginning of the expression for? Also what is the difference in using a / or \ ? What are the other, I assume, wildcards for? In other words, can we get some directions on how to code the expressions? Without them this is useless!

Ron

kliu0x52

User avatar
 
Posts: 569
Joined: October 18th, 2006, 2:23 pm
Location: .us

Post Posted May 4th, 2011, 4:32 pm

Ronv777 wrote:I just downloaded NoRedirects and my first question is: What is the ^ (caret) at the beginning of the expression for? Also what is the difference in using a / or \ ? What are the other, I assume, wildcards for? In other words, can we get some directions on how to code the expressions? Without them this is useless!

NoRedirect uses PCRE (Perl-Compatible Regular Expressions), and the meanings of these symbols can be found in the JavaScript docs (or the Perl docs).

And yes, I am aware that NoRedirect is a rather technical extension that does not have a friendly interface for most users, and I do apologize. And yes, there are plans to make NR easier to use, though I have no ETA on when I'll get around to doing that overhaul.
My addons: NoRedirect | QuickDrag | URL Flipper | TabSubmit
Developers: Make sure to test your addons for RTL compatibility!

pookiesdame
 
Posts: 1
Joined: May 6th, 2011, 9:08 am

Post Posted May 6th, 2011, 9:23 am

So this add-on is designed only for users proficient in JavaScript or Perl? Sigh. Sweetly and with a smile, my suggestion is that you'd have a larger number of users (and presumably $$ donors) if even us non-techies could use the interface intuitively.

I was able to use this add-on to block Charter hijacks, and for that I sincerely say thank you. I would say thank you more enthusiastically if the interface hadn't made me nuts -- I downloaded this three days ago but gave up and un-installed it after twenty minutes when I couldn't make it do anything. Tried again today after Googling for some user advice (found here: http://www.howinthetech.com/put-an-end-to-your-isp-redirecting-dns-errors/) and with only five more minutes of headscratching, presto!

All snark aside, thanks!

kliu0x52

User avatar
 
Posts: 569
Joined: October 18th, 2006, 2:23 pm
Location: .us

Post Posted May 7th, 2011, 12:38 am

pookiesdame wrote:So this add-on is designed only for users proficient in JavaScript or Perl?

Hehe, no, it was designed for an even narrower audience: me. :) All of my addons are things that I made to fill a personal need, and this is especially true of NR: it started out as a private tool that I had not planned on releasing.

Over time (emphasis on that), I hope to make it more suited for a wider audience... specifically, the NR overhaul will add a UI to the status bar (addon bar in Fx4+) that will indicate that a redirect has taken place (or has been blocked) with options for the user to block (or unblock) future redirects matching certain parameters of the redirect in question. This should allow users to add/remove rules without ever directly interacting with the rule editor (which will still be around for advanced users).
My addons: NoRedirect | QuickDrag | URL Flipper | TabSubmit
Developers: Make sure to test your addons for RTL compatibility!

Return to Extension/Theme Releases


Who is online

Users browsing this forum: No registered users and 3 guests