XF 1.4 Redirect old urls


2 years ago i used Vbulletin, with a photogallery. Users posted images in their text with those image urls, like


Now we are using Xenforo, and we deleted all images of Vbulletin (accidentally) but Google webmaster tools is giving crawl errors of not found urls. More than 400 errors, and they are all from these attachments. How can i solve this problem? Its impossible to edit hunderds posts to delete the image url. So i thought about redirecting all /attachments/ urls to my homepage (htaccess).

How can i do this? And What is your opinion?

I appreciate your support.

Jake Bunce

XenForo moderator
Staff member
Well, a "not found" error is appropriate if the content no longer exists.

If you want to redirect those links to your homepage then add these rules to the top of the .htaccess file in your web root:

RewriteEngine On

RewriteRule ^attachments/[0-9]+/$ /? [R=301,L]