Results 1 to 10 of 10

Attachments not Rewriting

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

  1. #1
    Member
    Join Date
    Dec 2005
    Posts
    33
    Liked
    0 times

    Attachments not Rewriting

    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?

  2. #2
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    13 times
    Is it rewriting attachment URLs for attachments on the posts where they are attached?

  3. #3
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    169 times
    Hello,

    which attachment URL format do you try to set?

  4. #4
    Member
    Join Date
    Dec 2005
    Posts
    33
    Liked
    0 times
    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

  5. #5
    Member
    Join Date
    Dec 2005
    Posts
    33
    Liked
    0 times
    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:
    Code:
    <a href="http://attachments.techguy.org/attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a>
    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.

  6. #6
    Member
    Join Date
    Dec 2005
    Posts
    33
    Liked
    0 times
    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]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a>

  7. #7
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    13 times
    Which hack are you using to store attachments on a separate server?

  8. #8
    Member
    Join Date
    Dec 2005
    Posts
    33
    Liked
    0 times
    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.

  9. #9
    Member
    Join Date
    Dec 2005
    Posts
    33
    Liked
    0 times
    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!

  10. #10
    Member
    Join Date
    Dec 2005
    Posts
    33
    Liked
    0 times
    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]

Similar Threads

  1. Exposing vbSEO rewriting engine=better compatibility with other hacks
    By SEO Report in forum vBSEO Features Archive
    Replies: 7
    Last Post: 10-05-2008, 02:54 PM
  2. PM Attachments 3.5
    By Ashley in forum Troubleshooting
    Replies: 10
    Last Post: 03-11-2006, 02:47 PM
  3. Attachments in PM
    By infordig in forum Troubleshooting
    Replies: 3
    Last Post: 12-11-2005, 09:28 AM
  4. Bug with managing attachments in edit mode
    By BamaStangGuy in forum Bug Reporting
    Replies: 2
    Last Post: 11-07-2005, 06:31 PM
  5. Attachments Don't Work
    By Bad Bunny in forum Troubleshooting
    Replies: 5
    Last Post: 10-01-2005, 01:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •