vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Redirect VB 4 urls to VB 5 (https://vborg.vbsupport.ru/showthread.php?t=308278)

temsamane 02-13-2014 11:59 AM

Redirect VB 4 urls to VB 5
 
i had my vb4 installation in www.example.com/forums

the new vb5 installation is in www.forums.examle.com

now i want to redirect all urls from old installation to the new one. How can i do this?

When i visit the old urls, i get:

Warning: Division by zero in ..../includes/functions.php on line 2968

Fatal error: Call to undefined method vB_Template_Runtime::vBVar() in /home/public_html/forums/includes/class_core.php(4715) : eval()'d code on line 76

Seven Skins 02-13-2014 12:11 PM

I guess you can redirect by using htaccess file.

Try putting this htaccess code in www.example.com/forums/ folder

PHP Code:

RewriteEngine On
RewriteRule 
(.*) http://www.forums.example.com/$1 [R=301,L] 

Not tested but should work.

temsamane 02-13-2014 12:21 PM

thank you Seven Skins,

but the url structure of vb5 is forum.example.com / subject title

so its not like the vb4 with numbers structure, like url / showthread.php?t=17718

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

i tested it, and its working. Thank you Very Much!!

its automatically redirects to the new url structure (from the general vbulletin url structure)

Seven Skins 02-13-2014 12:36 PM

Glad it is working.

If some clicks your old url they will be redirected to the new urls .. and slowly in weeks and months .. all the bookmarks and google links will update..

Make sure this htaccess stays there forever.


All times are GMT. The time now is 10:39 PM.

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.01079 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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