MULTIPLE cookieless domains (speed improvement)
Since vbulletin uses a LOT of images plus CSS and JS i decided to separate all of them into cookie less domains
First of all on admincp set cookies only for your forum MAIN domain (ie www.mysite.com) not .mysite.com DNS: First of all i created some subdomains static.mysite.com static2.mysite.com staticcss.mysite.com staticjs.mysite.com all of them pointing to the same server Web server: i created a new vhost: Code:
<VirtualHost *:80> My vb site is in: /usr/local/www/web_mysite_com and the static content is in: /usr/local/www/estaticos_mysite_com inside this new vhost directory i also made two aliases (because of my permissions) clientscript -> ../web_mysite_com/clientscript images -> ../web_mysite_com/images * given my permission direct access to this shite would give you a forbidden, maybe you could create an empty index file htaccess: i have a redirect for my domain so now i had to make a few changes to: Code:
RewriteCond %{HTTP_HOST} !^www\.mysite\.com go to your admincp and create a new plugin in global_complete hook Code:
$oz_process = str_replace('"http://www.mysite.com/clientscript/vbulletin_css/', '"http://staticcss.mysite.com/clientscript/vbulletin_css/', $output); images: Go yo "templates and styles" choose your style and then in Style Vars filter by imgdir replace those PATHs with new-hostname/ + original path IE: images/buttons -> http://static2.mysite.com/images/buttons NOTE: because a bug in vb code here you can make a real mess, check this report first: http://tracker.vbulletin.com/browse/VBIV-7479 * Long story short: a solution that worked for me was from David Grove: Quote:
|
Thanks .. very nice article
does this work for vb3.8? or is it only for vb4? |
If your htaccess goal is to simply force a www you can simplify it to:
RewriteCond %{HTTP_HOST} ^mysite.com$ RewriteRule (.*) http://www.mysite.com/$1 [L,R=301] It will now allow anyhost.mysite.com but when its just mysite.com without a subdomain or host it 301's to tripleW. 2lines vs. 6 lines |
Useful article and it will improve page rank when I use firebug add-on in FF
Thanks and subscribed to this. |
Demo if you can !
Regards, |
thanks all,
Sayid, how could this improve pagerank? klaus: you are right, im not sure why i did it this way lazyindian: it should work :) |
thanks
|
thanks 4 useful topic
|
should I paste this code ? where ? or is this commands?
|
Quote:
|
i am wondering if i can know about the vhost creation
|
All times are GMT. The time now is 06:42 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|