Announcement

Collapse
No announcement yet.

Upgrading from 4.2.5 to Vbulletin 5 with an existing 301 redirect already present. Advanced URL and rewrite question.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upgrading from 4.2.5 to Vbulletin 5 with an existing 301 redirect already present. Advanced URL and rewrite question.

    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    
    # In some cases where you have other mod_rewrite rules, you may need to remove the
    # comment on the following RewriteBase line and change it to match your folder name.
    # This resets the other mod_rewrite rules for just this directory
    # If your site was www.example.com/forum, the setting would be /forum/
    #RewriteBase /
    
    #If you used friendly urls in vB4, then uncommenting the following rules will redirect the #
    #old vB4 urls to a similar location in vB5. This is unnecesary for a new vB5 install.
    #RewriteRule ^threads/.* showthread.php [QSA]
    #RewriteRule ^forums/.* forumdisplay.php [QSA]
    #RewriteRule ^members/.* member.php [QSA]
    #RewriteRule ^blogs/.* blog.php [QSA]
    #RewriteRule ^entries/.* entry.php [QSA]
    
    #To redirect users to the secure version of your site, uncomment the lines below
    #RewriteCond %{HTTPS} !=on
    #RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
    
    #Block directories that don't need direct access
    RewriteRule ^(core/libraries/|includes|core/includes|core/vb|core/vb5|core/admincp|core/modcp) index.php?routestring=relay/404 [END]
    
    #Block files and directories
    RewriteRule (^|/)\.(?!well-known) index.php?routestring=relay/404 [END]
    
    #Block directories that don't need direct access to PHP
    RewriteRule ^(css|fonts|images|js|core/cache|core/cpstyles|core/clientscript|core/customavatars|core/images|core/store_sitemap)/.*\.php index.php?routestring=relay/404 [END]
    
    # Send css calls directly to the correct file VBV-7807
    RewriteRule ^css.php$ core/css.php [NC,L]
    
    # Redirect old install path to core.
    RewriteRule ^install/ core/install/ [NC,L]
    
    # Main Redirect
    RewriteCond %{REQUEST_URI} !\.(gif|jpg|jpeg|png|css)$
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]
    </IfModule>

    The above is part of the .htaccess file within Vbulletin 5. Can you advise which ones i need to use and which ones i need to add given the following scenario:

    I am going from Vbulletin 4.2.5 (Advanced URLs) to Vbulletin 5. My forum directory is currently https://forum.mydomain.com (lets called this current domain)...so i want to keep the same structure when moving to 4.2.5. This url will remain https://forum.mydomain.com (lets call this the new domain**)

    However, i previously was using https://www.mydomain.com/forums/ (lets call this old domain) which i have set up a 301 to go to 'current domain' and i still see some 'old domain' urls indexed in Google (even after i originally moved 2 years ago).....so this 301 must stay still. So this is going from Vb4 to Vb4 (and its working great now). But now i want to upgrade to vb5

    So, i know if i go from 4.2.5 current domain to vb5 'new domain**' we need to set it up like the instructions tell us. But, what about that old domain i used to have thats still redirecting things from 4.2.5 to 4.2.5 but just changing url paths. Do I now need to redirect from 4.2.5 to vb5 on old domain and replace the 4.2.5 to 4.2.5 redirects with it? Logically im thinking thats what we probably need to do....but wanted to make sure.

    So, i guess i have 2 parts to the question. How to handle advanced URLs (i only see reference to friendly urls in the htaccess) and how do i handle the rewrite rules given my situation described above.

    Thanks.

  • #2
    Only Advanced URLs in vBulletin 4.X used .htaccess. They were in the "Friendly URLs" option group. The lines are referring to the exact same thing.

    Remove the comment mark from these two lines in the vBulletin 5.6.0 .htaccess file:

    Code:
    #RewriteRule ^threads/.* showthread.php [QSA]
    #RewriteRule ^forums/.* forumdisplay.php [QSA]
    If you have problems with Blog Entries redirecting then remove the comment mark from this line:

    Code:
    #RewriteRule ^entries/.* entry.php [QSA]
    vBulletin 5 already uses /members/ and /blogs/ for their locations.

    You shouldn't have to do anything else with the redirects on your "old domain."
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    Related Topics

    Collapse

    Working...
    X