Resource icon

Redirection Scripts for vBulletin 3.x 8.0

No permission to download
Sorry - what exactly do you need. Do you want an old thread URL from VB then a new thread from Xenforo once imported over? - sorry for sounding like a knuckle head! Also - I just found something very strange in my VBSEO - ACP. Forum URL setting was set to none. but all others were set to see attachment. how do I know how long it has been like this and how do I proceed?

Here is how a recent thread looks -http://www.mysite.com/f55/admins-soup-day-9-1-13-a-23235/#post265656
 

Attachments

  • Screen Shot 2013-09-01 at 6.15.54 AM.webp
    Screen Shot 2013-09-01 at 6.15.54 AM.webp
    5.3 KB · Views: 10
Sorry - what exactly do you need. Do you want an old thread URL from VB then a new thread from Xenforo once imported over? - sorry for sounding like a knuckle head! Also - I just found something very strange in my VBSEO - ACP. Forum URL setting was set to none. but all others were set to see attachment. how do I know how long it has been like this and how do I proceed?

Here is how a recent thread looks -http://www.mysite.com/f55/admins-soup-day-9-1-13-a-23235/#post265656

And what is the new URL for that same thread?
 
@tommydamic68

Add this to the top of the .htaccess file in your web root:

Code:
RewriteEngine On

RewriteRule ^[^/]+/.+-([0-9]+)/$ /community/index.php?threads/$1/ [R=301,L]

That should do it.

Since the ids are the same you don't need the php scripts. You only need the rewrites.
 
@tommydamic68

Add this to the top of the .htaccess file in your web root:

Code:
RewriteEngine On

RewriteRule ^[^/]+/.+-([0-9]+)/$ /community/index.php?threads/$1/ [R=301,L]

That should do it.

Since the ids are the same you don't need the php scripts. You only need the rewrites.

Is this the .htaccess within my public_html/community folder or the .htaccess in public_html/ root.
 
Does it matter that i have this already existent in the web root .htaccess file? Remember, i had another site with vb. This is what is there currently.

# Use PHP 5.3
AddType application/x-httpd-php53 .php

# Ticket PBB-18872701
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/meso/public_html
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>
# Ticket PBB-18872

DirectoryIndex index.php
#RewriteEngine Off

# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On

RewriteCond %{HTTP_HOST} ^mysite.com$
RewriteRule ^/?$ "http\:\/\/www\.mysite\.com\/" [R=301,L]

RewriteCond %{HTTP_HOST} ^mysite.com$
RewriteRule ^forum\.php\/?(.*)$ "http\:\/\/www\.mysite\.com\/forum\.php$1" [R=301,L]

# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/)
#RewriteBase /

#RewriteCond %{HTTP_HOST} !^www\.mysite\.com
#RewriteRule (.*) http://www.mysite.com/$1 [L,R=301]

RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|cliscript|cpoiis|imges)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]

<Files 403.shtml>
order allow,deny
allow from all
</Files>

deny from 71.20
deny from 71.54
deny from 71.23
deny from 209.
deny from 24.2
deny from 184
deny from 68
deny from 74
deny from 7
deny from 96.23
deny from 99.1
deny from 50.5
deny from 75.
deny from 24.

RewriteCond %{HTTP_USER_AGENT} ^Baiduspider.* [NC]

#RewriteCond %{HTTP_HOST} ^mysite.com$
#RewriteRule ^/?$ "http\:\/\/www\.mysite\.com\/" [R=301,L]

#RewriteCond %{HTTP_HOST} ^mysite.com$
#RewriteRule ^forum\.+\/?(.*)$ "http\:\/\/www\.mysite\.com\/forum\.php$1" [R=301,L]
# Expire images header
ExpiresActive On
ExpiresDefault A0
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/ico A2592000
ExpiresByType text/css A2592000
ExpiresByType text/javascript A2592000
# compress text, html, javascript, css, xml:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

# Or, compress certain file types by extension:
<files *.html>
SetOutputFilter DEFLATE
</files>

RewriteEngine On
RewriteRule ^Microsoft-Server-ActiveSync$ hgpush/index.php
 
Does it matter that i have this already existent in the web root .htaccess file?

Nope. Put it at the top.

Also - how do i actually redirect the "site" from what it was with vb http://www.mysite.com/forum.php to http://www.mysite.com/community.

Amendment to previous code to redirect the forum index as well:

Code:
RewriteEngine On

RewriteRule ^[^/]+/.+-([0-9]+)/$ /community/index.php?threads/$1/ [R=301,L]
RewriteRule ^forum\.php$ /community/ [R=301,L]

and what measure do i needd to do to not allow people or anything else to access the old site?

Amend again to fallback to a catchall redirect:

Code:
RewriteEngine On

RewriteRule ^[^/]+/.+-([0-9]+)/$ /community/index.php?threads/$1/ [R=301,L]
RewriteRule ^forum\.php$ /community/ [R=301,L]
RewriteRule ^.*$ /community/ [R=301,L]

That will redirect all traffic to /community except for the preceding specific redirects.
 
Nope. Put it at the top.



Amendment to previous code to redirect the forum index as well:

Code:
RewriteEngine On

RewriteRule ^[^/]+/.+-([0-9]+)/$ /community/index.php?threads/$1/ [R=301,L]
RewriteRule ^forum\.php$ /community/ [R=301,L]



Amend again to fallback to a catchall redirect:

Code:
RewriteEngine On

RewriteRule ^[^/]+/.+-([0-9]+)/$ /community/index.php?threads/$1/ [R=301,L]
RewriteRule ^forum\.php$ /community/ [R=301,L]
RewriteRule ^.*$ /community/ [R=301,L]

That will redirect all traffic to /community except for the preceding specific redirects.

In layman terms - what does this mean? That will redirect all traffic to /community except for the preceding specific redirects.

And can i now turn on friendly URLs in the admin cp settings?
 
In layman terms - what does this mean? That will redirect all traffic to /community except for the preceding specific redirects.

Reading the code, it says... redirect threads, redirect forum index, all other links go to forum index.

And can i now turn on friendly URLs in the admin cp settings?

Yes. That is separate from the redirects and will use the .htaccess file in the /community directory.
 
so i'm done? Have added your code in root .htaccess and turned on friendly URL's in ACP. Do i need to submit my site to google etc?

thanks,
 
Top Bottom