XF 1.2 Redirection problem

Kuya

Member
Hi,

Yesterday I took the plunge and moved my forum from Vbulletin 4.2 onto Xenforo.

Everything went fine, until I tried to set some 301 redirects from the old urls. I have a facebook page so I have a list of some random pages from the old software, but I don't know what I am doing wrong.

I used the "vBulletin 4.x URL Redirection" resource and perhaps I did something wrong (it was at 4am). My 301 config php file looks like this:

<?php

/* ----------------------------------------------------------- *\
This variable defines where XenForo is installed.

If you have not installed XenForo into the same directory in which
vBulletin was installed, you will need to provide the full path to
the XenForo directory here. Remove the leading // and then enter
the path as in the following examples:

$fileDir = '/home/example/public_html/new_forums';

$fileDir = 'C:/inetpub/wwwroot/xenforo';

\* ----------------------------------------------------------- */

$fileDir = 'home/public_html/www.british-filipino.co.uk';

/* ----------------------------------------------------------- *\
This constant defines the table from which the import redirection
scripts will fetch their data. Normally they will use the table
'xf_import_log', but if you have archived your import data, you
should provide the name of the archive table here. Remove the
leading // and then replace 'import_log_x' with the name of your
archive table, as in the following examples:

define('IMPORT_LOG_TABLE', 'my_import_log');

define('IMPORT_LOG_TABLE', 'import_log_my_forums');

\* ----------------------------------------------------------- */

define('IMPORT_LOG_TABLE', 'archived_import_log');>

Does this look right?
 
I did that, it still doesn't seem to work. Currently I have:

<?php

/* ----------------------------------------------------------- *\
This variable defines where XenForo is installed.

If you have not installed XenForo into the same directory in which
vBulletin was installed, you will need to provide the full path to
the XenForo directory here. Remove the leading // and then enter
the path as in the following examples:

$fileDir = '/home/example/public_html/new_forums';

$fileDir = 'C:/inetpub/wwwroot/xenforo';

\* ----------------------------------------------------------- */

// $fileDir = '/home/public_html/www.british-filipino.co.uk';

/* ----------------------------------------------------------- *\
This constant defines the table from which the import redirection
scripts will fetch their data. Normally they will use the table
'xf_import_log', but if you have archived your import data, you
should provide the name of the archive table here. Remove the
leading // and then replace 'import_log_x' with the name of your
archive table, as in the following examples:

define('IMPORT_LOG_TABLE', 'my_import_log');

define('IMPORT_LOG_TABLE', 'import_log_my_forums');

\* ----------------------------------------------------------- */

define('IMPORT_LOG_TABLE', 'archived_import_log');>
 
I meant that it needs to be removed (it's not in the 3.x redirect scripts; I couldn't really speak about the 4.x ones as they're created by a third-party).
 
Thanks Mike, I think the issue is with my .htaccess. Not sure if you know much about that, but what I have currently is:

# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>

ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 500 default

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/old-dir/showthread.php /new-dir/showthread.php
RewriteRule ^/old-dir/forumdisplay.php /new-dir/forumdisplay.php

# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo

# This line may be needed to enable WebDAV editing with PHP as a CGI.
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>

I'm a complete noob when it comes to these kinds of things, I know my way round some php and html, but I am no coder.
 
Back
Top Bottom