• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.1 URL Redirect (vB 3.8 with vBSEO to XF)

MsJacquiiC

Well-known member
#1
So I've read a few threads regarding URL redirects. I'm a bit confused. But here are the specifics of how I completed the migration:

  1. vB w/ vBSEO was installed on my main domain.
  2. XF was installed in another directory.
  3. Once XF was installed and import complete - I placed the vB in another directory located at http://jpicforum.info/OLDvB3/forum/
  4. I then moved XF to the main domain http://jpicforum.info
So I've followed the instructions listed at Redirection Scripts for vBulletin 3.x to no avail. Perhaps because I modified the directories...? IDK

But can someone please advise as to how I can accomplish the redirection of my old vB 3 urls to my new XF url structure? I'd certainly appreciate it! A step-by-step would be sweetness :D

Thanks.

J.
 

Jake Bunce

XenForo moderator
Staff member
#2
In your case:

1) Upload those redirect scripts to your "main domain" (where vB was, and where XF now is).

2) Add rewrite rules to your .htaccess file to map the vBSEO URLs to the redirect scripts. This site will give you appropriate rewrite rules:

http://tools.geekpoint.net/xfseo/

That should do it.
 

MsJacquiiC

Well-known member
#3
Thanks for your kind response Jake! I've a couple issues actually.

1. I'd used subdreamer cms to power the homepage. It was integrated into vBulletin database. So the vB script was actually installed in the /forum folder.
2. I now use xenPorta with the "Set as Index Controller" setting activated.

So I'm not sure I can place the redirect scripts into "forum" folder. When I do - obviously the forum doesn't show.

Can you suggest a work-around for this issue please?
 

Jake Bunce

XenForo moderator
Staff member
#4
You could use this addon to change the index route:

http://xenforo.com/community/resources/route-changer.447/

You will see there is a note about XenPorta at the bottom. You can use a different route instead of "forum" which will avoid the conflict with your redirects.

Another option would be to manage your redirects without the /forum directory by setting up some rewrite rules to capture the old /forum URLs of a specific format (ie threads, forums, etc). The redirect scripts would then go into your web root, and the rewrite rules would be added to XenForo's .htaccess file, something like this:

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

	RewriteRule ^forum/[^/]+/([\d]+)-.+-([\d]+)\.html /showthread.php?t=$1&page=$2 [NC,L]
	RewriteRule ^forum/[^/]+/([\d]+)-.+\.html /showthread.php?t=$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>
 

MsJacquiiC

Well-known member
#5
Wow! I'm more designer than coder.... I'm quite sure I wouldn't have been able to get this redirect thing correct without your assistance Jake! I used the 2nd option above and voila! Success = Thanks so very much for your assistance dude!
 

MsJacquiiC

Well-known member
#6
Okay - one final question if I might. Having visited the xFSEO vBSEO rewrite script -- I'm told the forum url rewrite is an unsupported format. So I want to redirect manually.

For instance - What was http://jpicforum.info/forum/jpic-forum-rules/ should now redirect to http://jpicforum.info/link-forums/jpic-forum-posting-policy.91/

Here's the contents of my .htaccess file as it is now:

# 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} !^jpicforum\.info
RewriteRule ^(.*)$ http://jpicforum.info/$1 [L,R=301]

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

Redirect 301 /forum/jpic-forum-rules/ http://jpicforum.info/link-forums/jpic-forum-posting-policy.91/
Redirect 301 /forum/news-announcements/ http://jpicforum.info/forums/news-announcements.6/
Redirect 301 /forum/questions-concerns-comments-suggestions/ http://jpicforum.info/forums/questions-concerns-comments-suggestions.11/
Redirect 301 /forum/jpic-admin-notes/ http://jpicforum.info/forums/jpic-admin-notes.87/
Redirect 301 /forum/member-introductions/ http://jpicforum.info/forums/member-introductions.9/
Redirect 301 /forum/lit-articles-database/ http://jpicforum.info/forums/lit-articles-database.66/
Redirect 301 /forum/general-chat/ http://jpicforum.info/forums/general-chat.12/
Redirect 301 /forum/forum-games/ http://jpicforum.info/forums/forum-games.19/
Redirect 301 /forum/polling-booth/ http://jpicforum.info/forums/the-polling-booth.43/
Redirect 301 /forum/rant-room/ http://jpicforum.info/forums/the-rant-room.16/
Redirect 301 /forum/lots-humor/ http://jpicforum.info/forums/lots-of-humor.10/
Redirect 301 /forum/crazy-pics/ http://jpicforum.info/forums/crazy-pics.13/
Redirect 301 /forum/adults-only/ http://jpicforum.info/forums/adults-only.14/
Redirect 301 /forum/community-complexion/ http://jpicforum.info/forum/#community-complexion.1
Redirect 301 /forum/blushing-lounge/ http://jpicforum.info/forum/#the-blushing-lounge.4
Redirect 301 /forum/poetic-colours/ http://jpicforum.info/forum/#poetic-colours.3
Redirect 301 /forum/creative-traditional/ http://jpicforum.info/forums/creative-traditional.28/
Redirect 301 /forum/spoken-word-freestyle/ http://jpicforum.info/forums/spoken-word-freestyle.29/
Redirect 301 /forum/emotional-romantic/ http://jpicforum.info/forums/emotional-romantic.34/
Redirect 301 /forum/spiritual-poems/ http://jpicforum.info/forums/spiritual-poems.30/
Redirect 301 /forum/miscellaneous/ http://jpicforum.info/forums/miscellaneous.36/
Redirect 301 /forum/critique-saloon/ http://jpicforum.info/forums/the-critique-saloon.44/
Redirect 301 /forum/revisions/ http://jpicforum.info/forums/revisions.45/
Redirect 301 /forum/final-edit/ http://jpicforum.info/forums/final-edit.46/
Redirect 301 /forum/mature-tableau/ http://jpicforum.info/forums/mature-tableau.83/
Redirect 301 /forum/adult-writes/ http://jpicforum.info/forums/adult-writes.84/
Redirect 301 /forum/poetry-defined/ http://jpicforum.info/forum/#poetry-defined.47
Redirect 301 /forum/types-poetry/ http://jpicforum.info/forums/types-of-poetry.48/
Redirect 301 /forum/discussions-poetic-types/ http://jpicforum.info/forums/discussion-of-poetic-types.49/
Redirect 301 /forum/wide-world-poetry-news/ http://jpicforum.info/forums/wide-world-of-poetry-news.70/
Redirect 301 /forum/poet-poetess-biographies/ http://jpicforum.info/forums/poet-poetess-biographies.69/
Redirect 301 /forum/creativity-outlet/ http://jpicforum.info/forums/creativity-outlet.51/
Redirect 301 /forum/shades-fiction/ http://jpicforum.info/forum/#shades-of-fiction.5
Redirect 301 /forum/short-stories/ http://jpicforum.info/forums/short-stories.37/
Redirect 301 /forum/inspiring-novelists/ http://jpicforum.info/forums/inspiring-novelists.38/
Redirect 301 /forum/essays/ http://jpicforum.info/forums/essays.39/
Redirect 301 /forum/sketched-review/ http://jpicforum.info/categories/sketched-in-review.20/
Redirect 301 /forum/literature/ http://jpicforum.info/forums/literature.22/
Redirect 301 /forum/movies-film/ http://jpicforum.info/forums/movies-film.21/
Redirect 301 /forum/music/ http://jpicforum.info/forums/music.23/
Redirect 301 /forum/poetry-visual/ http://jpicforum.info/forum/#poetry-of-the-visual.59
Redirect 301 /forum/artworks/ http://jpicforum.info/forums/artworks.60/
Redirect 301 /forum/palettes-flavour/ http://jpicforum.info/forums/palettes-of-flavour.67/
Redirect 301 /forum/miscellaneous-melange/ http://jpicforum.info/forum/#miscellaneous-melange.8
Redirect 301 /forum/contests/ http://jpicforum.info/forums/contests.54/
Redirect 301 /forum/jpic-link-directory/ http://jpicforum.info/forums/jpic-link-directory.58/
Redirect 301 /forum/recycle-bin/ http://jpicforum.info/forums/recycle-bin.57/

# 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>
The redirects work just fine. But - Is this format correct as is?