Discussions » Development

Redirect to YggTorrent.is for old link witch yggtorrent.com

§
Posted: 2018-05-10
Edited: 2018-05-10

Redirect to YggTorrent.is for old link witch yggtorrent.com

Hi everybody,

i have tested many script witch less modification for this, but i dont find the solution.

I want redirect all domain "yggtorrent.com" to "yggtorrent.is"

include, link and domain, because in the comment of users on this website is not include link, and the only solution it's copy and paste, modified link and go to this link, i want simplify this witch use left click on addres selected by mouse and use "open to the new tab" for exemple.

i think the solution is in the code ::smile:

// ==UserScript==
// @name        YggTorrent.com to YggTorrent.is
// @namespace   http://domain.com/directory
// @description Redirect YggTorrent.com to YggTorrent.is!
// @include     http://*yggtorrent.com*/*
// ==/UserScript==

window.location.replace("https://yggtorrent.is");

but witch this code, all redirect to the main page of yggtorrent.is not save the full adress.

oh and it's possible redirect http to https ^^

i need Help =)

Ps : sorry for my bad english...

wOxxOmMod
§
Posted: 2018-05-10
Edited: 2018-05-10

Replace the last line with this:

location.href = "https://yggtorrent.is" + location.pathname + location.search + location.hash;
§
Posted: 2018-05-10

thank's but not works...

my script it doesn't load on the website

§
Posted: 2018-05-10
Edited: 2018-05-10

the format of the new adress is

https://yggtorrent.is/xxx/xxx/xxx.xx.xxx.x.xx

wOxxOmMod
§
Posted: 2018-05-10
Edited: 2018-05-10

It's better if you post a real URL both in the old and new format because those xxxx don't seem a reliable representation.

§
Posted: 2018-05-10
Edited: 2018-05-10

Witch this modification, the script is loaded on https://yggtorrent.is

but when i open a link witch the old format https://yggtorrent.com

the script is not loaded on the page...

// ==UserScript==
// @name        Redirect to Yggtorrent.is
// @namespace   http://domain.com/directory
// @description Redirect yggtorrent.com to yggtorrent.is!
// @include     https://yggtorrent.com*/*
// @include     https://yggtorrent.is*/*
// ==/UserScript==
location.href = "https://yggtorrent.is" + location.pathname + location.search + location.hash;

i think it's only works witch link no ? i need works witch no link (format text on forum/comment)

§
Posted: 2018-05-10
Edited: 2018-05-10

New : https://yggtorrent.is/torrent/application/windows/200817-microsoft+windows+server+2016+standard+x64+fr

Old : https://yggtorrent.com/torrent/application/windows/213483-windows+server+2016+version+1709+x64+fr

On the first link you will see the link posted format... (text only) on the comment list :smile:

Ajouté par Petitbonheur il y a 1 mois
pour infos ceux qui ont demander la 1709  je vien de la poster ( Windows Server 2016 Version 1709 x64 Fr )

https://yggtorrent.com/torrent/application/windows/213483-windows+server+2016+version+1709+x64+fr
wOxxOmMod
§
Posted: 2018-05-10
  1. You don't need to load the script on the target site, remove // @include https://yggtorrent.is*/*
  2. I think this entire idea won't work because the really important part of the URL is different: 213483 vs 200817. Other parts of the URL are also slightly different.
§
Posted: 2018-05-10
Edited: 2018-05-10

the 213483 and 200187 is not the same page sorry, the domain .com is down... it's just a link in the forum used for a other page...

ok, so i link the 3 links for see the problem =)

Page tested for using script :

https://yggtorrent.is/torrent/application/windows/200817-microsoft+windows+server+2016+standard+x64+fr

on this page i test the script in the comment... and yes the page is net exist, because is delete but the script do change the adress no ?

Example of Link comment on the old page use the old domain and the link used is : https://yggtorrent.com/torrent/application/windows/168896-windows+server+2003+r2+datacenter+x64+edition+-+sp2+-+french

not work, because the domain is dead...

and for acces to the new, only need replace .com by .is, the addres of the comment is now : https://yggtorrent.is/torrent/application/windows/168896-windows+server+2003+r2+datacenter+x64+edition+-+sp2+-+french

works because, replace .com witch the new .is manually

I need a script for replace .com to .is in domain of yggtorrent

wOxxOmMod
§
Posted: 2018-05-10

In that case the problem here is that yggtorrent.com doesn't exist, which is why the script won't help you. I think a simpler solution would be to use some URL-redirector extension for the browser.

§
Posted: 2018-05-10

oh ok, i see. i will seek this extension now...

thank's for your help.

§
Posted: 2018-05-10

Thank's it's works ! (Redirector for Firefox)

§
Posted: 2018-05-10

if any person need the solution... this is capture of settings for redirector.

Post reply

Sign in to post a reply.