Move images directory to another server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rikman
    New Member
    • Jun 2003
    • 19
    • 3.7.x

    Move images directory to another server

    Hi there,

    we want to include all vB images (except custom avatars and attachments of course) from another server.

    I moved the images folder to our other machine and changed the path variables in the style from www.blahblahblah.com/forum/images/ to www2.blahblahblah.com/img/.

    Additionally I made an UPDATE to the smilies and icon tables. So there are also the correct URL's for the images are given in the appropriate tables.

    This works except with the post icons. These are included from our first machine anymore when viewing a forum or thread. Interesting, that the icons in the post forms (where you can choose an icon for your post) are included from the new location ...

    Anyone knows what to do?

    rikman
  • Floris
    Senior Member
    • Dec 2001
    • 37767

    #2
    Did you try 'update counters' for forums, threads, posts, post cache, etc ? Maybe that fixes a few things. Check the path for the icons too, do they start with http:// ?

    Comment

    • ragintajin
      Senior Member
      • Jun 2003
      • 106
      • 3.0.3

      #3
      One thing that I did was I made the image directory a redirect (via htaccess). So basically:

      http://myserver.com/mirror/ » http://remoteserver.com/forums/images/

      the htaccess redirect is intelligent enough so, for example:

      http://myserver.com/mirror/header.jpg » http://remoteserver.com/forums/images/header.jpg

      It works like a charm.

      Comment

      • pran
        Senior Member
        • Aug 2001
        • 114
        • 3.8.x

        #4
        Can you post your .htaccess here?

        Comment

        • James Kojiro
          Senior Member
          • Jun 2004
          • 580
          • 3.6.x

          #5
          You know, you can also change the urls for each style's images in the Admin CP to absolute urls if you desire.

          Admin CP>Styles and Templates>Style Manager>Template Name>All Style Options>Image Paths

          Comment

          • pran
            Senior Member
            • Aug 2001
            • 114
            • 3.8.x

            #6
            Which I already did. However, this does not include the avatars and post icons. My board has over 1,000 avatars and changing each and everyone of them into absolute URLs is a pain. A mod_rewrite solution is more appropriate (and faster too).

            Comment

            • Zachery
              Former vBulletin Support
              • Jul 2002
              • 59097

              #7
              For post icons you need to update the icon manager settings

              However only avatars that are not custom will be able to be stored on another domain.

              AdminCP > Post Icons >

              Comment

              • pran
                Senior Member
                • Aug 2001
                • 114
                • 3.8.x

                #8
                Originally posted by Zachery
                For post icons you need to update the icon manager settings

                However only avatars that are not custom will be able to be stored on another domain.

                AdminCP > Post Icons >
                Yes, did that too and I'm aware that custom avatars will not be served by the static files server. I was able to make it work by using this mod_rewrite recipe:

                Code:
                RewriteEngine On
                RewriteRule /avatars/(.*[^/][^(custom)])/(.*\.(jpg|gif|png))$ [url="http://images.kuro.ph/avatars/$1/$2"]http://images.k[color=#22229c]uro.ph/avatars/$1/$2[/color][/url][color=#22229c][u] [R,L][/u][/color]
                However, it doesn't seem to display the actual location of the avatar image even if was served from the static files server.

                Comment

                widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                Working...
                😀
                😂
                🥰
                😘
                🤢
                😎
                😞
                😡
                👍
                👎