Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-15-2016, 10:00 PM
twistsol's Avatar
twistsol twistsol is offline
 
Join Date: Apr 2015
Location: Cottage Grove, MN
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 09-16-2016, 10:11 AM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just use standard 301 redirects..

Redirect 301 /articleurl.html fullurl
Reply With Quote
  #3  
Old 09-28-2016, 02:57 PM
twistsol's Avatar
twistsol twistsol is offline
 
Join Date: Apr 2015
Location: Cottage Grove, MN
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Благодарность от:
MarkFL
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03692 seconds
  • Memory Usage 2,188KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (1)post_thanks_box_bit
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete