Running vBSEO 2.4.0 with vB 3.5.4.
I change "Rewrite Attachment URLs" to Yes, select a format below, and click Save... but attachment URLs that appear in threads are not changed. Is there something I'm missing?
This is a discussion on Attachments not Rewriting within the Troubleshooting forums, part of the vBSEO SEO Plugin category; Running vBSEO 2.4.0 with vB 3.5.4. I change " Rewrite Attachment URLs " to Yes, select a format below, and ...
Running vBSEO 2.4.0 with vB 3.5.4.
I change "Rewrite Attachment URLs" to Yes, select a format below, and click Save... but attachment URLs that appear in threads are not changed. Is there something I'm missing?
Is it rewriting attachment URLs for attachments on the posts where they are attached?
Hello,
which attachment URL format do you try to set?
Oleg Ignatiuk / Crawlability Inc.
Security vbulletin - Patch Level for all supported versions released!
Unveiling the NEW vBSEO Sitemap Generator 3.0. - available NOW for vBSEO Customers!
Wow, thanks for the quick replies!
I've tried a few (though not all), but currently have it set as: forum[forum_id]/[attachment_id]-[original_filename]
But in the post where it is attached, it still shows as:
/attachment.php?attachmentid=76067&d=1143180357
Just did some testing and figured out that it doesn't work because our attachments are on a seperate dedicated server.
For example, our postbit_attachment includes the line:
If I remove the http://attachments.techguy.org/ from the line, then the rewrite works fine -- except it's pointing to our main site, not the server with the attachments.Code:<a href="http://attachments.techguy.org/attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a>
FYI, for anyone who is in a similar situation, I just turned on the vBSEO feature and manually rewrote the postbit_attachment* templates to match, but with the URL pointing to the proper server. For example:
Code:<a href="http://attachments.techguy.org/attachments/$attachment[attachmentid]/$attachment[filename]&d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a>
Which hack are you using to store attachments on a separate server?
None, really. Just changed a few templates to point to that server (like editing of posts, uploading, etc), and have all of the attachments in the file system of that server. You could technically have the attachments in a network share and have all of the servers be able to serve them, but I didn't think it was worth the trouble and little bit of overhead.
Well, my plan was good in theory -- but doesn't work when there is a space in the filename. If anyone has any other ideas, or if there's some way to get vBSEO to point to a different server, let me know!
The solution to a rewrite problem? How about another rewrite! I suspect that the proper solution to my problem can be found in the Custom Rewrites that vBSEO offers, but I didn't take the time to figure it out. Instead, I added this to my httpd.conf:
Code:RewriteRule ^/attachments/(.*)$ http://attachments.techguy.org/attachments/$1 [L]