Carnage
08-10-2008, 10:00 PM
This was a problem we were having on our forums, we have several different styles, each have their own image sets. When a new version of vBulletin came out that added a new icon or we installed an addon such as the blog we found that there were missing images all over the place.
The solution:
First, all alternative images were moved to a directory named skins, the images for each skin were put into appropriately named directories inside the skins directory.
Then the following code was placed into a .htaccess file in the skins directory.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/(.*)$ /images/$2
Essentially what this does, is if a file is not found within the sub-directories it rewrites it to look instead in the default vBulletin images directory.
This will work with all versions of vBulletin provided your host supports mod_rewrite directives in .htaccess files.
The solution:
First, all alternative images were moved to a directory named skins, the images for each skin were put into appropriately named directories inside the skins directory.
Then the following code was placed into a .htaccess file in the skins directory.
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/(.*)$ /images/$2
Essentially what this does, is if a file is not found within the sub-directories it rewrites it to look instead in the default vBulletin images directory.
This will work with all versions of vBulletin provided your host supports mod_rewrite directives in .htaccess files.