vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   Redirecting old articles to new articles (https://vborg.vbsupport.ru/showthread.php?t=323468)

twistsol 09-15-2016 10:00 PM

Redirecting old articles to new articles
 
I asked this on vBulletin.com a few weeks ago and received no response so I thought I'd try here.

Problem:
In our old vb3 installation, we had a directory for articles from pre CMS days. This articles directory was in our forum root. In some cases there were .PDF files in /articles/files and in other cases, a single directory was dedicated to an article for example a review of the Ryobi BD4600 sander had an html file and other supporting files in /articles/bd4600.

When we upgraded to vb4, I manually converted all of these old articles into actual CMS articles and we were able to leave the old articles directory in place. We are now on vb 5.2.3, and the articles system won't work with that directory on the server so it was removed as part of the upgrade. We now have over 4500 not found search engine crawl errors most of which relate these old articles. If you try to navigate to one of the old articles you receive the appropriate error message below.

Invalid Page URL. If this is an error and the page should exist, please contact the system administrator and tell them how you got this message.

The actual Question:
Is there a way that I can redirect these old links to the actual VB5 article through .htaccess or another method?

On our site, I'm willing to update all the bad links manually, but there are many other external links to these same articles.

RichieBoy67 09-16-2016 10:11 AM

Just use standard 301 redirects..

Redirect 301 /articleurl.html fullurl

twistsol 09-28-2016 02:57 PM

OK, I tried this on my local installation and here is what is happening. In my .htaccess I have the following line immediately after the RewriteEngine On directive.

Code:

Redirect /vb5/articles/files/browning.pdf http://localhost/vb5/articles/mobile-shops-bases/824890-jeff-browning-s-bt3000
The resulting URL that comes out is
Code:

http://localhost/vb5/articles/mobile-shops-bases/824890-jeff-browning-s-bt3000?routestring=articles/files/browning.pdf
The question mark and everything following it shouldn't be there, and no matter what I do, it adds the original bad URL after the route string. Any ideas?

--------------- Added [DATE]1475101134[/DATE] at [TIME]1475101134[/TIME] ---------------

Figured it out. Adding a ? after the redirected URL solved the problem.


All times are GMT. The time now is 01:13 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01124 seconds
  • Memory Usage 1,712KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete