Thread: Miscellaneous Hacks - 404 / 301 after import redirect on import ids
View Single Post
  #26  
Old 08-10-2008, 05:16 PM
tommythejoat's Avatar
tommythejoat tommythejoat is offline
 
Join Date: Apr 2008
Location: Boston
Posts: 155
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since I don't have ready access to the domain name server, I tried to put a .htaccess redirect on the "from" board and hoped that the vBulletin board would capture the inbound requests and redirect them.

The redirect experiment did not go well. I could not get the behavior I was looking for on either end.

This is the contents of the .htaccess file located on the bbv2 site:
Code:
# bbv2 assigns .boy .pm and .cgi to the cgi-script handler in Apache
# Trailing slash references to nawcc-mb.com/bbv2/

AddHandler cgi-script .boy .pm .cgi
DirectoryIndex bbBoard.cgi bbBoard.cgi

# vBulletin message board has a 404 redirect to map bbv2 references to vBulletin references
# The bbBoard.cgi reference will be trapped by the 404 handler on mb.nawcc.org - disable until ready

Redirect permanent /bbBoard.cgi http://mb.nawcc.org/bbv2/bbBoard.cgi
I expected this to catch the reference to bbBoard.cgi and send it to mb.nawcc.org. The top two directives were already in the .htaccess file.

I put the 404 trap handler on mb.nawcc.org and edited the .htaccess file there to read:
Code:
ErrorDocument 404 /var/www/html/404t.php

php_flag log_errors on
php_value error_log /var/www/html/php_error.log
I had already been using the php error log to debug the migration software.

I tried changing the path for 404t.php to just "/" and to nothing but the file name as well as the form shown in the code box.

References to the old board are not redirected, they just display the old board.

If I edit the reference on my browser address line to substitute the new board address, I just get a 404 error. If I directly reference mb.nawcc.org/404t.php, the debug message prints when I turn on debug. With debug off, I get a 500 error, but nothing in the php error log.

Can someone tell me how the .htaccess files should be set up? I am stuck at this point.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02216 seconds
  • Memory Usage 1,766KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete