vBulletin 4.x URL Redirection

vBulletin 4.x URL Redirection 1.0.0

No permission to download
Is there a way to include archive ?

Everything is working fine except that, so I am looking a way to include archive and send it to the original thread itself.

Posible ?
 
As the old thread got closed I'll repost my question:

Gene Steinberg said:
*snip*

We did a fresh import of the vB 4 stuff in XF 1.0.4 before updating. I removed the standard default node first, so it was clean.

Here's an example: http://www.theparacast.com/forum/threads/8909-Dust-and-What-Was-That

It sends you to the forum's home page, but not to the thread listed.

So where do I go from here? anyone?
I'm having exactly the same problem as Gene, did anyone manage to figure out why? (I can see his now redirects correctly)

----

Gene informs me that someone on here fixed it, does anybody know what that 'fix' is? I've tried all the suggestions in the previous thread to no avail!

Thanks,
James.
 
I followed all directions here and on the import archive page and I am still having trouble with vb4.x redirects. My site was using Basic Rewrites in vB... any tips?

edit: it appears to be the redirects that are causing the problems... The following works for me:
Code:
Options +FollowSymlinks
RewriteEngine on
RewriteOptions MaxRedirects=10
 
Redirect 301 /forum/showthread.php http://www.mysite.com/xenforo/showthread.php
Redirect 301 /forum/forumdisplay.php http://www.mysite.com/xenforo/forumdisplay.php

The recommended rules do not work for me:

Code:
RewriteRule ^/forum/showthread.php /xenforo/showthread.php
RewriteRule ^/forum/forumdisplay.php /xenforo/forumdisplay.php

Is there any issue with using what I have above?
 
in my site case following links of my site from google were not redirected, however i applied all the instructions above..

http://www.mydomain.com/showthr...ويئر-چونڊيو-۽-هڪ-ئي-ڪلڪ-سان-انسٽال-ڪري-وٺو۔۔۔

http://mydomain.com/showthread.php?15623-فولڊرز-کي-پنهنجي-پسند-جا-رنگ-ڏيو&p=94445

Thanks to Jack Bunce, who recommended following rules..

Code:
    RewriteCond %{QUERY_STRING} (\?|^)([0-9]+)-.*
    RewriteRule showthread.php http://www.mydomain.com/showthread.php?t=%2 [R=301,L]
 
EDIT this is now fixed for me.

Below RewriteEngine On (in /.htaccess):
Code:
RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)-([a-zA-Z0-9_\-]+)
RewriteRule ^forums/showthread.php /showthread.php?t=%2 [R=301,L]

Also notice mine is spelled /forums not /forum like yours ;)
---------------------------
Old post:

Joshua,
I'm having troubles with this as well.

My VB4 forum was in /forums and Xenforo is now in /

If I load mysite.com/showthread.php?t=4 it works fine.
If I load mysite.com/forums/showthread.php?t=4 it does not forward propertly (shows the 404 Xen foro error).

mod_rewrite URLS e.g showthread.php?4-hello-world work fine as well, but not /forums/showthread.php

I tried this in the root folder .htaccess, inside the <IfModule mod_rewrite.c> loop.
Code:
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)-([a-zA-Z0-9_\-]+)
RewriteRule /home/my-user-name/my-domain/forums/showthread\.php /showthread.php?t=%2 [R=301,L]

I also tried a number of other configurations, including outside that loop like:
Code:
RewriteEngine On
RewriteCond %{QUERY_STRING} (^|\?)([0-9]+)-([a-zA-Z0-9_\-]+)
RewriteRule forums/showthread\.php /showthread.php?t=%2 [R=301,L]
No luck yet. I was thinking since XF redirects /forums to my root, this might be the problem. But I can't make this redirect work still.

I also tried changing the second part of that regular expression (the output) to include the full domain path. I think I just suck at this. :(
 
I transferred from vbulletin w/ vbseo and I setup redirects and used the VB4 redirect software which worked great. However I noticed that for some links, it redirects and adds my forum path.

For example: in this thread below:
When it redirects it sends it to
Instead of
Why is it adding in my server path??
Other links redirect fine, but this does worry me!

For reference, here is my htaccess file
Here is my .htaccess
RewriteCond %{HTTP_HOST} ^mysite\.com$ [NC]
RewriteRule ^(.*)$ http://www.mysite.com/$1 [R=301,L]

RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [R=301,NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]
RewriteRule f([\d]+)/index([\d]+).html forumdisplay.php?f=$1&page=$2 [R=301,NC,L]
RewriteRule f([\d]+)/ forumdisplay.php?f=$1 [NC,L]




#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 transferred from vbulletin w/ vbseo and I setup redirects and used the VB4 redirect software which worked great. However I noticed that for some links, it redirects and adds my forum path.

For example: in this thread below:

When it redirects it sends it to

Instead of

Why is it adding in my server path??
Other links redirect fine, but this does worry me!

For reference, here is my htaccess file

Use a full web path for the targets.

This:

Code:
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [R=301,NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]
RewriteRule f([\d]+)/index([\d]+).html forumdisplay.php?f=$1&page=$2 [R=301,NC,L]
RewriteRule f([\d]+)/ forumdisplay.php?f=$1 [NC,L]

Becomes this:

Code:
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html /showthread.php?t=$1&page=$2 [R=301,NC,L]
RewriteRule [^/]+/([\d]+)-.+.html /showthread.php?t=$1 [NC,L]
RewriteRule f([\d]+)/index([\d]+).html /forumdisplay.php?f=$1&page=$2 [R=301,NC,L]
RewriteRule f([\d]+)/ /forumdisplay.php?f=$1 [NC,L]

I added a / in front of showthread.php and forumdisplay.php. That assumes those files are in the web root. If they are in a subdirectory then add that.
 
I must be doing something wrong. I am using the vbulletin mod_rewrite url redirect for vBulletin. I have done the conversion and followed the instructions but all old vBulletin urls do not redirect correctly.

Take this url for example: http://www.politicaljack.com/threads/37087-Ashoken-Farewell‎

That just redirects back to the main forum page.

Here is my .htaccess:

Code:
#    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
    RewriteCond %{HTTP_HOST} ^politicaljack\.com [NC]
    RewriteRule (.*) http://www.politicaljack.com/$1 [L,R=301]
 
 
    #    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>
AuthName "xenForo Test Bed"
AuthUserFile "/home/politics/.htpasswds/public_html/xenforo/passwd"
 
This is the 301 config file:

Code:
<?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/politics/www';
/* ----------------------------------------------------------- *\
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 double checked and everything appears correct here.
 
@BamaStangGuy

The ids are the same so the redirect scripts aren't necessary. Just add this code to your .htaccess file:

Rich (BB code):
#    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
    RewriteCond %{HTTP_HOST} ^politicaljack\.com [NC]
    RewriteRule (.*) http://www.politicaljack.com/$1 [L,R=301]
 
    RewriteRule ^threads/([0-9]+)-.*$ /threads/$1? [R=301,L]

    #    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>
AuthName "xenForo Test Bed"
AuthUserFile "/home/politics/.htpasswds/public_html/xenforo/passwd"
 
Top Bottom