How do I redirect from old to new forum?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • digitalhome
    Senior Member
    • Aug 2004
    • 140
    • 3.6.x

    How do I redirect from old to new forum?

    On my site I used to have a forum which I will call old forum (which had a forum id of 50) that was replaced with a new forum (which has a forum id of 70)

    I have some links in another part of my site that point to the old forum so I thought I would create an .htaccess file in my forum subdirectory and have any requests for the old forum redirect to the new forum

    Here is what I put in my .htaccess file

    Code:
    Redirect /forum/forumdisplay.php?f=50 http://www.mysite.com/forum/forumdisplay.php?f=70
    Mysite.com is obviously got my URL in it and the subdirectory for my forum is /forum.

    For some reason this fails and I am not sure why.

    Is there a better way or can any tell me how I goofed.

    Thanks in advance
  • jnr
    New Member
    • Jun 2007
    • 8
    • 3.6.x

    #2
    I have the same problem and the .htaccess fix didn't work - apparently because the redirect mechanism seems to truncate the URL beginning with the question mark after forumdisplay.php.

    Anybody?

    Originally posted by digitalhome
    On my site I used to have a forum which I will call old forum (which had a forum id of 50) that was replaced with a new forum (which has a forum id of 70)

    I have some links in another part of my site that point to the old forum so I thought I would create an .htaccess file in my forum subdirectory and have any requests for the old forum redirect to the new forum

    Here is what I put in my .htaccess file

    Code:
    Redirect /forum/forumdisplay.php?f=50 http://www.mysite.com/forum/forumdisplay.php?f=70
    Mysite.com is obviously got my URL in it and the subdirectory for my forum is /forum.

    For some reason this fails and I am not sure why.

    Is there a better way or can any tell me how I goofed.

    Thanks in advance
    Joshua Rubin, Admin, GreenMachines.net
    Green Corporate Responsibility Forums

    Comment

    • jnr
      New Member
      • Jun 2007
      • 8
      • 3.6.x

      #3
      Here's the solution

      With a assist from Jake Bunce of the vBulletin team, who suggested I use the RewriteEngine, I tracked down the solution. I modified the code I found at http://www.webmasterworld.com/forum92/1917.htm. Here's an example of how to do it:

      To redirect defunct link
      http://www.greenmachines.net/forumdisplay.php?f=16

      to
      http://www.greenmachines.net/forumdisplay.php?f=31

      put this in your .htaccess file:

      Code:
      Options +FollowSymlinks
      RewriteEngine on
      RewriteCond %{QUERY_STRING} ^f=16$ 
      RewriteRule ^forumdisplay\.php$ [URL]http://www.greenmachines.net/forumdisplay.php?f=31[/URL] [R=301,L]

      Originally posted by digitalhome
      On my site I used to have a forum which I will call old forum (which had a forum id of 50) that was replaced with a new forum (which has a forum id of 70)

      I have some links in another part of my site that point to the old forum so I thought I would create an .htaccess file in my forum subdirectory and have any requests for the old forum redirect to the new forum

      Here is what I put in my .htaccess file

      Code:
      Redirect /forum/forumdisplay.php?f=50 http://www.mysite.com/forum/forumdisplay.php?f=70
      Mysite.com is obviously got my URL in it and the subdirectory for my forum is /forum.

      For some reason this fails and I am not sure why.

      Is there a better way or can any tell me how I goofed.

      Thanks in advance
      Joshua Rubin, Admin, GreenMachines.net
      Green Corporate Responsibility Forums

      Comment

      Related Topics

      Collapse

      Working...