1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Redirect adding Server path for some reason? Please help!

Discussion in 'Troubleshooting and Problems' started by OakleyForum, Apr 13, 2013.

  1. OakleyForum

    OakleyForum Active Member

    I transferred from vbulletin w/ vbseo and I setup redirects and used the VB4 redirect software which worked great. However I noticed that for some links, it redirects and adds my forum path.

    For example: in this thread below:
    When it redirects it sends it to
    Instead of
    Why is it adding in my server path??
    Other links redirect fine, but this does worry me!
  2. OakleyForum

    OakleyForum Active Member

    I think it has something to do with the pages. Because I tried one link and noticed that a lot of the errors are when the link points to a page other than the first one. I took one link which was having the error and when I removed the page number in the old link it worked.

    What could be causing this? I really want to solve it!
  3. OakleyForum

    OakleyForum Active Member

    Anyone please?
  4. Tracy Perry

    Tracy Perry Well-Known Member

    Did you manually do rewrites, or are you using one of the add-ons
    If using the software (which it appears you are) try asking in the discussion forum for that software. It looks like they were posted by Mike (for v 3.x) and Luke Foreman (for v 4), so you are more likely to get a quicker response there.
    Luke is REAL good about getting back with someone pretty quickly - you can also start a conversation with him.
    Also, you did follow the instructions at http://xenforo.com/help/import-redirection/ I assume.
  5. OakleyForum

    OakleyForum Active Member

    I have some manual rewrites but just for single pages which weren't redirecting, the majority of redirects are done by the software. I will ask in the thread thanks!
  6. Tracy Perry

    Tracy Perry Well-Known Member

    It may also help if you give example of your rewrites and whether you are using Apache, nginx or lightspeed.
  7. OakleyForum

    OakleyForum Active Member

  8. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Use a full web path for the targets.


    RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [R=301,NC,L]
    RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]
    RewriteRule f([\d]+)/index([\d]+).html forumdisplay.php?f=$1&page=$2 [R=301,NC,L]
    RewriteRule f([\d]+)/ forumdisplay.php?f=$1 [NC,L]
    Becomes this:

    RewriteRule [^/]+/([\d]+)-.+-([\d]+).html /showthread.php?t=$1&page=$2 [R=301,NC,L]
    RewriteRule [^/]+/([\d]+)-.+.html /showthread.php?t=$1 [NC,L]
    RewriteRule f([\d]+)/index([\d]+).html /forumdisplay.php?f=$1&page=$2 [R=301,NC,L]
    RewriteRule f([\d]+)/ /forumdisplay.php?f=$1 [NC,L]
    I added a / in front of showthread.php and forumdisplay.php. That assumes those files are in the web root. If they are in a subdirectory then add that.
    Tracy Perry likes this.

Share This Page