XF 1.2 Redirect vbseo attachments?

Andre Daub

Active member
vBulletin:

domain.tld/attachments/suche-verkaufe/16620d1313950457-adidas-f50-adizero-prime-sg-anodized-purple-infrared-electricity-sam_1172.jpg

XF:

domain.tld/forum/attachments/next-gen-adizero-jpg.22482/

Ho can i redirect the vbulletin links to the new XF Attachements?
 
Is that the same attachment? I'm guessing that the old attachment was 16620, though I'm not 100% positive. If so, there are no redirect scripts for attachments so it's not trivial (that would have to be written).
 
FYI: We managed it to work. Required this Rewrite:
Code:
RewriteRule ^attachments/(.+)/([0-9]+)[d-](.+)$ attachment.php?attachmentid=$2 [L]
and the redirection scripts in the root of the domain. 301config.php was adjusted to point to the new XF location (in /forum) and that made old attachment links work.

Additionally, we had to insert
PHP:
$config['enableClickjackingProtection'] = false;
into library/config.php so that Google Image Search works (more precisely: loading the associated page to a matched image).
 
FYI: We managed it to work. Required this Rewrite:
Code:
RewriteRule ^attachments/(.+)/([0-9]+)[d-](.+)$ attachment.php?attachmentid=$2 [L]
and the redirection scripts in the root of the domain. 301config.php was adjusted to point to the new XF location (in /forum) and that made old attachment links work.

Additionally, we had to insert
PHP:
$config['enableClickjackingProtection'] = false;
into library/config.php so that Google Image Search works (more precisely: loading the associated page to a matched image).

What about this url: http://www.v6mustang.com/vb/attachments/f7/72506d1121305572-dpfe-sensor-dpfe-sensor.jpg

in Nginx?

attachment.php resides in /vb/ folder.

I have tried this but it doesn't work:

Code:
rewrite ^/vb/attachments/(.+)/([0-9]+)[d-](.+)$ /vb/attachment.php?attachmentid=$2 last;
 
I got this to work with the following rewrite:

Code:
rewrite ^/vb/attachments/[^/]+/([0-9]+)d.+$ /index.php?attachments/$1/ permanent;

and by editing staticfiles.conf in nginx to remove the jpg extension.
 
I need an NGINX rewrite for attachments.

Code:
From:
http://www.my-domain.de/attachments/alte-fotowettbewerbe-hunde/61955d1389003298-hund-jahre-2013-hund-mai.jpg

to
http://www.my-domain.de/attachments/hund-mai-jpg.61955/
 
Top Bottom