• Resolved SyberKnight

    (@syberknight)


    to redirect domain2.com to domain1.com/specific-page

    i’m used to having to add custom 301 redirect rules to my sites’ htaccess file.
    when i do that, & someone goes to domain2.com, they’re taken to the “specific-page” on domain1.com – but the url in the address bar changes from domain2.com to domain1.com/specific-page. this doesn’t affect any links on that page.

    i just discovered that when i use this plugin, the url in the address bar stays as the added domain2.com. this means when the user clicks on a link in that page that’s relative like “/another-page”, instead of being taken to domain1.com/another-page they’re taken to a broken (non-existent) domain2.com/another-page.

    is there a way to have this work more like the htaccess method or do i have to change all the relative links (/another-page) in the site to full url links (https://domain2.com/another-page)?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author matthias.wagner

    (@matthiaswagner)

    hy.
    the plugin does not work with htaccess rules, but it scans your content for links and also hooks into all filters which are fired when wordpress generates links (like in the menu for example, or when you call a get_permalink function in your theme/plugin.

    so yes, manually added relative links will not be discovered and therefore can’t be mapped correctly.

    matt

    Thread Starter SyberKnight

    (@syberknight)

    thanks for your reply & assistance!

    okay, so it should be good to go for everything generated via WordPress (menus, images, links from within text blocks, etc) – i will just need to redo any added code where i manually inserted links to anything to use the full url’s.

    just confirming i understand completely – is that correct?

    thank you.

    Plugin Author matthias.wagner

    (@matthiaswagner)

    yep. just try it out in a single place and you will see if it works, than you can proceed with everything else ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Broken Links’ is closed to new replies.