in the other words, I want when I put http://YYY .org/t/1212
on Chrome/Firefox search bar the browser automatically changes the URL (aka redirect) to http://XXX .org/t/1212
Please guide me to write a simple extension to do that.
UPDATE
I personally wrote a extension but still there's a problem :(
var url = window.location.href; // Returns full URL
var rest = url.substring(20);
window.stop();
$(location).attr('href', 'http://imdb.com/'+rest)
but the browser load the http://YYY .org/t/1212
completely and then redirect to http://XXX .org/t/1212
. Is there any way to prevent the browser? I took some time and traffic