ModRewrite collide with a Redirect 301

Discussion in 'Apache' started by postcd, Feb 15, 2022.

  1. #1
    Hello,

    in .htaccess i have

    while /Introductions/5-abc-def/ should be redirected to /showthread.php?t=5-abc-def

    that would work, but the Redirect 301 (no matter if located above or below) gets favored and instead redirects /Introductions/5-abc-def/ to /forumdisplay.php?1-Introductions

    Please how my htaccess rules should look like so that it redirect as i have mentioned it should + i can also manually redirect /Introductions ?
     
    postcd, Feb 15, 2022 IP
  2. postcd

    postcd Well-Known Member

    Messages:
    1,043
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    190
    #2
    If i am not mistaken, one solution may be to replace:
    by:
    I do not know if it is 100% or why/if ^ ? $ have to be used, at it seems to be working with the mentioned RewriteRule.
     
    postcd, Feb 15, 2022 IP