send google referals to the new urls

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SnitchSeeker
    Senior Member
    • Aug 2004
    • 141
    • 3.8.x

    send google referals to the new urls

    I am upgrading from 3.0 to 3.6 and changing the location of my forums from /vb3/index.php (stupid idea, it wasn't mine) to /forum.php

    60% or more of our visitors are from Google and I fear what will happen when all the threads are moved to another location.

    Rather than a simple 404 message, is there a way to catch the thread number or post number from the url, and send them to the new location of the same thread/post?

    Or what should I do?

    Forum: http://www.snitchseeker.com/vb3/
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    You can use a ".htaccess" file in your old forum directory to redirect users:

    Code:
    Redirect / http://forum.domain.com/
    This will redirect all requests using the new base URL. I forget if you need the ending slash or not.

    Comment

    • SnitchSeeker
      Senior Member
      • Aug 2004
      • 141
      • 3.8.x

      #3
      Thanks. However, I should have mentioned I am using a Windows server. IIS or whatever it's called.

      Comment

      • Jake Bunce
        Senior Member
        • Dec 2000
        • 46598
        • 3.6.x

        #4
        Hmm yeah, htaccess only works on Apache. I don't know how to do this in IIS, but there is probably a way. I recommend the Server Configuration forum if no one else here is able to help you.

        Comment

        • feldon23
          Senior Member
          • Nov 2001
          • 11291
          • 3.7.x

          #5
          No offense to Jake, but the redirect he posted would have lost you all your Google rankings anyway.

          I am not sure if Jake's redirect would work. I don't know if it includes the query line (everything after the ?).

          A large Harry Potter community with over 50,000 members. Fan-fiction, Role-playing, chat, gallery, school, webmaster help, forums, games, and more



          I use the mod_rewrite engine of Apache:

          RewriteEngine On
          RewriteRule ^vb3/index.php(.*)$ http://www.snitchseeker.com/forum.php$1 [R=301]
          RewriteRule ^vb3/(.*)$ http://www.snitchseeker.com/$1 [R=301,L]

          A large Harry Potter community with over 50,000 members. Fan-fiction, Role-playing, chat, gallery, school, webmaster help, forums, games, and more

          would be redirected to:
          A large Harry Potter community with over 50,000 members. Fan-fiction, Role-playing, chat, gallery, school, webmaster help, forums, games, and more


          IIS is completely different. It is a control panel setting:
          • In internet services manager, right click on the file or folder you wish to redirect
          • Select the radio titled "a redirection to a URL".
          • Enter the redirection page
          • Check "The exact url entered above" and the "A permanent redirection for this resource"
          • Click on 'Apply'
          Last edited by feldon23; Thu 19 Oct '06, 2:55pm.

          Comment

          • Jake Bunce
            Senior Member
            • Dec 2000
            • 46598
            • 3.6.x

            #6
            Does that mean there is a way to redirect without losing rank? I don't even consider that when implementing redirects. Htaccess is simply the best way to redirect when changing directories.

            Comment

            • feldon23
              Senior Member
              • Nov 2001
              • 11291
              • 3.7.x

              #7
              I don't know how Google calculates rank, but I believe that a basic Redirect drops everything after the ?, so every single thread, post, etc. will be redirected to index.html. My redirects will at least make it so when Google comes crawling back around it will see the same content it indexed last time instead of a completely different, unindexed page. Did some searches but nothing definitive from Google on how it figures all this out.

              RewriteCond and RewriteRule are perfectly valid in .htaccess. I just set up 20 of them. You can write full RegExes with it.
              Last edited by feldon23; Thu 19 Oct '06, 2:56pm.

              Comment

              • Jake Bunce
                Senior Member
                • Dec 2000
                • 46598
                • 3.6.x

                #8
                When I used this for server moves in the past, it didn't drop anything. For example:

                http://www.yoursite.com/forum/showthread.php?t=123

                ...becomes:

                http://www.yoursite.com/showthread.php?t=123

                Comment

                • feldon23
                  Senior Member
                  • Nov 2001
                  • 11291
                  • 3.7.x

                  #9
                  RewriteRule ^quantumleap(/)?$ http://www.mywebsite.com/newsite/quantumleap [R,NC]

                  will apply to:






                  etc.

                  Comment

                  • feldon23
                    Senior Member
                    • Nov 2001
                    • 11291
                    • 3.7.x

                    #10
                    Originally posted by Jake Bunce
                    When I used this for server moves in the past, it didn't drop anything. For example:

                    http://www.yoursite.com/forum/showthread.php?t=123

                    ...becomes:

                    http://www.yoursite.com/showthread.php?t=123
                    Interesting. Seems I had some kind of problem with this in the past. I don't remember what.

                    Comment

                    • SnitchSeeker
                      Senior Member
                      • Aug 2004
                      • 141
                      • 3.8.x

                      #11
                      Will the query be forwarded as well?

                      Thanks to both of you for the excellent help! I really appreciate your time.

                      IIS is completely different. It is a control panel setting:
                      • In internet services manager, right click on the file or folder you wish to redirect
                      • Select the radio titled "a redirection to a URL".
                      • Enter the redirection page
                      • Check "The exact url entered above" and the "A permanent redirection for this resource"
                      • Click on 'Apply'
                      How do I get it to take the query? Or will it do that automatically if I follow your instructions?

                      I guess I am nervous about this because I am taking /vb3/index.php and trying to have it forwarded to /forum.php so It's not so easy to ask it to forward the whole folder (since my /index.php is not the forums but a front page).

                      Am I just confused?

                      Comment

                      • feldon23
                        Senior Member
                        • Nov 2001
                        • 11291
                        • 3.7.x

                        #12
                        You need two redirects.

                        /vb3/ -> /
                        /vb3/index.php -> /vb3/forum.php

                        The second one is almost optional since I think only the forumhome uses index.php. Everything else like showthread, forumdisplay, etc. are all separate PHP files.

                        Comment

                        • SnitchSeeker
                          Senior Member
                          • Aug 2004
                          • 141
                          • 3.8.x

                          #13
                          Nice, thank you!

                          I'll let you know how it goes.

                          Comment

                          Related Topics

                          Collapse

                          Working...