XF 1.4 Redirect old urls

asusforo

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

http://website.com/attachments/1865/

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.
 
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:

Code:
RewriteEngine On

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