Use Firefox so that is preferred. Thanks in advance.

  • ittu@kbin.social
    link
    fedilink
    arrow-up
    8
    ·
    edit-2
    1 year ago

    Redirector can do that

    https://addons.mozilla.org/en-US/firefox/addon/redirector/

    Example URL: https://lemmy.world/post/241226?scrollToComments=true
    
    Include pattern: ^(?:https?://)(?:www.)?(?:lemmy.world|lemm.ee|vlemmy.net|discuss.tchncs.de|lemmy.fmhy.ml|sh.itjust.works|beehaw.org|feddit.de|lemmy.one|lemmy.ca|lemmynsfw.com|lemmy.blahaj.zone|lemmygrad.ml|lemmy.dbzer0.com|midwest.social|lemmy.sdf.org|programming.dev|aussie.zone|feddit.uk|dormi.zone|startrek.website|feddit.it|feddit.nl|pawb.social|infosec.pub|feddit.dk|slrpnk.net|lemmy.nz|mander.xyz|feddit.cl|reddthat.com|szmer.info|lemmy.zip|lemmy.pt|latte.isnot.coffee|lemmy.kya.moe|dataterm.digital|waveform.social|exploding-heads.com|pathofexile-discuss.com|sub.wetshaving.social|yiffit.net|iusearchlinux.fyi|partizle.com|monero.town|mtgzone.com|lemmyrs.org|pathfinder.social|toast.ooo|lemmy.studio|lemmy.click|lemmy.film|fanaticus.social|lemmy.radio|lemmy.antemeridiem.xyz|lemmy.spacestation14.com|lemmy.eus|possumpat.io|rammy.site|discuss.online|compuverse.uk|lemmy.tf|preserve.games|dmv.social|lemmy.villa-straylight.social|lemmy.perthchat.org|thegarden.land|thelemmy.club|thegarden.land|ash1-lem-i1-u4829.vm.elestio.app|stars.leemoon.network|forum.basedcount.com|diggit.xyz|feddit.ch|r-sauna.fi|lemmy.whynotdrs.org|lemmy.wtf|lemmyfly.org|lemmy.picote.ch|lemmy.podycust.co.uk|picify.podycust.co.uk|bookwormstory.social|terefere.eu|social.fossware.space|lemmy.podycust.co.uk|aiparadise.moe|poptalk.scrubbles.tech|feddit.ro|lemmy.ko4abp.com|suppo.fi|group.lt|booty.world|lemmy.cafe|tucson.social|lib.lgbt|lemmy.srv.eco)/post/(?:s/)?(.*)
    
    Redirect to: https://MyLemmyInstance.com/post/$1
    
    Pattern type: Regular Expression
    
    Description: redirect lemmy instances to my own
    
    

    replace Mylemmyinstance.com with your own domain.

    i scraped the lemmy instances from the join-lemmy instance list. you can add in a instance just bey separating it with | .

    Note: this redirector rule will only redirect domains that has “/post/” in the url otherwise it’ll just go to the site. i haven’t tested any of the instances to see if they use something other than /post/ .

    update: i made a mistake because i misunderstood how the federation links work… i’ll try to fix it.

  • Eylrid@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    1 year ago

    It would be tricky to do automatically since instance domains can be anything, but it could be done with a context menu option.

  • cornflour@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    I am working on a web app where this is one of the features i want to have, but the biggest issue i’m facing is that the same post from different instances have different id, and I am not sure if there is a way to get the id of a post in a different instance… If anyone has an idea of how to do this I’d love to know!

  • Himawari@lemmy.4d2.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    1 year ago

    Not Lemmy specific but check out Redirector. It probably works with redirecting between communities but I’m not sure if it can redirect between posts since the IDs of the same posts are different between servers.