Results 1 to 12 of 12

Best way to redirect

This is a discussion on Best way to redirect within the General Discussion forums, part of the vBSEO SEO Plugin category; I had content on my domain ( www.mydomain.com ) and I'm now simply going to have a forum ( www.mydomain.com/forum ...

  1. #1
    Senior Member
    Real Name
    jdougher
    Join Date
    Feb 2007
    Posts
    118
    Liked
    0 times

    Question Best way to redirect

    I had content on my domain (www.mydomain.com) and I'm now simply going to have a forum (www.mydomain.com/forum). What's the best way to redirect? Through cpanel--or with an htaccess file? And if I use htaccess, what should be in it?

    Thanks.

  2. #2
    Senior Member
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,097
    Liked
    5 times
    Are you moving pages from the root to the forum directory, or are you just getting rid of the root page?
    The Forum Hosting - Forum Hosting from the Forum Experts

  3. #3
    Senior Member
    Real Name
    jdougher
    Join Date
    Feb 2007
    Posts
    118
    Liked
    0 times
    Quote Originally Posted by Michael Biddle View Post
    Are you moving pages from the root to the forum directory, or are you just getting rid of the root page?
    I'm just getting rid of the content in the root directory.

  4. #4
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    Place this in root .htaccess
    Code:
    RewriteEngine On
    RewriteRule (.*) http://www.yourdomain.com/forum/$1 [R=301,L]
    Any request to yourdomain.com or yourdomain.com/page.php will be sent to yourdomain.com/forum/ or yourdomain.com/forum/page.php
    for example.

  5. #5
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    But the point remains, why put something into a folder if you have nothing in root?

    moving the forum to root is usually the 'better' thing to do.

  6. #6
    Senior Member
    Real Name
    jdougher
    Join Date
    Feb 2007
    Posts
    118
    Liked
    0 times
    Quote Originally Posted by Brian Cummiskey View Post
    But the point remains, why put something into a folder if you have nothing in root?

    moving the forum to root is usually the 'better' thing to do.
    I was just thinking about that this morning in the shower. The thing is, I already have the forum set up in /forum. How can I move the whole thing to root without reinstalling and reconfiguring? Help would be most appreciated.

  7. #7
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    it's pretty easy.

    Moving to forum root - vBulletin SEO Forums

    Instead of step 2, change your vboptions -> site url setting to the new location, and also make sure your htaccess for non-www to www redirect path is also correct. That's all you need to do.

  8. #8
    Senior Member
    Real Name
    jdougher
    Join Date
    Feb 2007
    Posts
    118
    Liked
    0 times
    Quote Originally Posted by Brian Cummiskey View Post
    it's pretty easy.

    Moving to forum root - vBulletin SEO Forums

    Instead of step 2, change your vboptions -> site url setting to the new location, and also make sure your htaccess for non-www to www redirect path is also correct. That's all you need to do.

    So in terms of moving the files themselves, do I just ftp them to a folder on my local drive and then re-upload them to the root of domain? And I do this *after* I change the URL settings in vboptions? No issues with connecting to database?

  9. #9
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    If you have ssh access, that is the better way. you can simple do a mv command and it will only take a few seconds instead of hours to ftp down and up again (if you have a lot of attachments, etc)
    SSH commands

    Yes, change the vboptions setting first, or you might not be able to get into the admin panel again (always a good idea to leave that window/tab open while you move)

    The database won't move. it's still 'localhost' or whatever its set to now. that isn't changing.

  10. #10
    Senior Member
    Real Name
    jdougher
    Join Date
    Feb 2007
    Posts
    118
    Liked
    0 times
    Quote Originally Posted by Brian Cummiskey View Post
    If you have ssh access, that is the better way. you can simple do a mv command and it will only take a few seconds instead of hours to ftp down and up again (if you have a lot of attachments, etc)
    SSH commands

    Yes, change the vboptions setting first, or you might not be able to get into the admin panel again (always a good idea to leave that window/tab open while you move)

    The database won't move. it's still 'localhost' or whatever its set to now. that isn't changing.
    I do have ssh access, but I'm not familiar with ssh commands. So if I go in there with, say, Putty, the command would be what? mv *.* /?

  11. #11
    Senior Member
    Real Name
    jdougher
    Join Date
    Feb 2007
    Posts
    118
    Liked
    0 times
    Related question. What's involved in doing away with the "www" in the URL? Is it just a matter of removing it in admincp? Or are there other settings that have to be changed on the server?

  12. #12
    vBSEO Staff Brian Cummiskey's Avatar
    Real Name
    Brian Cummiskey
    Join Date
    Jul 2009
    Location
    btwn NYC and Boston
    Posts
    12,789
    Liked
    657 times
    Blog Entries
    2
    Copying is usually best, that way if you mess up the source is still there. You can delete it later.
    Code:
    cp -r /home/sitepath/public/forums /home/sitepath/public
    should do the trick, obviously replacing it with your actual path and folder names.


    Getting rid of the www is the same concept-- set the vboptions -> site url and homepage values without it, and make sure the htaccess is set without www's as well.

    [How to] Setup www.yourdomain.com or yourdomain.com (www vs. non-www) - With .htaccess 301 redirects - vBulletin SEO Forums

Similar Threads

  1. Need 301 Redirect Help redirect to default vb urls
    By s2kinteg916 in forum General Discussion
    Replies: 1
    Last Post: 01-27-2010, 03:18 AM
  2. Replies: 8
    Last Post: 12-13-2008, 07:05 AM
  3. linklerde neden böle redirect-to/?redirect
    By samet54 in forum Türkçe
    Replies: 2
    Last Post: 10-14-2008, 05:45 AM
  4. Replies: 5
    Last Post: 07-06-2008, 05:39 PM
  5. http://www.vbseo.com/redirect-to/?redirect=http
    By gooster in forum General Discussion
    Replies: 3
    Last Post: 04-10-2008, 12:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •