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

Redirection Scripts for Invision Power Board 3.x 4.0

Redirects IPB URLs to XenForo for SEO benefits

  1. Mike

    Mike XenForo Developer Staff Member

    Mike submitted a new resource:

    Redirection Scripts for Invision Power Board 3.1.x/3.2.x (version 4.0) - Redirects IPB URLs to XenForo for SEO benefits

    Read more about this resource...
  2. Keith

    Keith Member

    Hi, just a quick one, I've tried using this for 3.3.1 and edited the file to reflect a sub domain change as suggested int eh readme.

    I'm still having a problem where the script is forcing it to use the old directory and just ignoring the 301 config files redirection. Are there any obvious things I might be doing wrong here?
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    The path in 301config.php is to allow the redirect script to function outside of your XF directory. But the URL that it redirects you to uses this setting in XF:

    Admin CP -> Home -> Options -> Basic Board Information -> Board URL
  4. Keith

    Keith Member

    Thanks for the reply, my problem is I'm not getting out of the old forum path despite using the correct path to the new xf directory in the 301 file.

    The "Board URL" in teh new install of XF is correct but I don't think it's getting that far at the moment.
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I can take a look if you are comfortable giving me FTP access to your server.
  6. ekine

    ekine Active Member

    Does this redirection script also work for nginx webserver?
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    ekine likes this.
  8. ekine

    ekine Active Member

    Thank you for the link, Jake. :)
  9. ashkir

    ashkir Active Member

  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    It should work. Make sure you added the rewrite rules to your .htaccess file. Specifically, you need to add the red code to your .htaccess file:

    #	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
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default
    <IfModule mod_rewrite.c>
    	RewriteEngine On
    	# IPS Rewrite Rules
    	RewriteCond %{REQUEST_URI} /(topic|forum|user)/ [OR]
    	RewriteCond %{QUERY_STRING} (^|&)show(topic|forum|user)= [OR]
    	RewriteCond %{QUERY_STRING} ^/(topic|forum|user)/ [OR]
    	RewriteCond %{PATH_INFO} ^/(topic|forum|user)/
    	RewriteRule ^.*$ ips2xf.php [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]
    This is in the context of the XF .htaccess file which applies if XF is installed in the same directory that IPB was. If IPB was in a different directory than XF then add that code to the .htaccess file in that directory instead.
    ashkir likes this.
  11. ashkir

    ashkir Active Member

    Sadly, couldn't figure it out. I guess we'll just ride this through. IPB was installed in the same directory.
  12. Claudio

    Claudio Well-Known Member

    Is also VERY important to mention that you also need to remove the comment lines too on 301config.php after set the $fileDir or just move the $fileDir line to the second line outside the comment lines.

    Remove the # symbol before $fileDir is not enough..
  13. japersonal

    japersonal Member

    I wonder whether anyone has tried these redirection scripts for 3.0.3 IPB forums...

  14. Mike

    Mike XenForo Developer Staff Member

    I don't believe the importer supports the 3.0 series, but if the URLs are the same, then it should work.
  15. JackieChun

    JackieChun Active Member

    Now that the importer supports IPB 3.4, can this resource be updated?
  16. Mike

    Mike XenForo Developer Staff Member

    The redirects still work.
  17. Vitor Dos Reis

    Vitor Dos Reis Active Member

    Hi, I have some questions:

    1) It's possible to redirect from a subdomain to a subdirectory? ipb3.myurl.com to myurl.com/xenforo
    2) I'm away of being an expert when the subject is redirecting. Last time I loose more than 1 million of URLs. Xenforo staff can give me direct support on this?
    3) It's a big database converted some years ago from vbulletin3. Any limitation?

  18. japersonal

    japersonal Member

    If that's the case, I would suggest you hire the services from someone skilled in this area. For instance, @RoldanLT did a great job helping me to merge an existing Xenforo (migrated from vBulltin) with another, IPB-based forum. :)
    Vitor Dos Reis and RoldanLT like this.
  19. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Yes it's possible. If you give me an example old and new URL for the same thread then I can give you exact instructions.
    Vitor Dos Reis likes this.
  20. Qwest

    Qwest Member

Share This Page