Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Step by Step guide to speed up your VB4 OR VB3
final kaoss
Join Date: Apr 2006
Posts: 1,314

 

Show Printable Version Email this Page Subscription
final kaoss final kaoss is offline 07-27-2011, 10:00 PM

There are several steps to improve your page loading speed. I will go over a few steps that will improve your site's loading time.

Step 1: Tweak your htaccess.
Open the htaccess file in your forum root and add the following below any url rewrite rules you may have from:
Vbulletin 3 or 4 with VBSEO installed
VB4 Forum Classic
VB4 Suite
VB3 by itself

This covers the following Pagespeed Rules.

Leverage browser caching
Specify a cache validator
Enable gzip compression

Make the following changes in your admincp

Code:
Mod Rewrite Friendly URLs

From: Settings > Options > Friendly Urls: Select Mod Rewrite Friendly Urls
This helps to cache nearly any file type that you may add in your attachment options (if you allow people to upload music files, zip files, rar files etc.. see the list lol)

*some people report login problems, I have posted below what works for me. Be sure to do this step as well to avoid problems!!
https://vborg.vbsupport.ru/showthread.php?t=267588#3

Browse to the bottom of this first post for the .htaccess code.

Step 2: Optimize images
There is no more need to do this for vb4 packages unless you wish to do this on other images such as avatars, custom buttons, attachments, gallery uploads etc.

This covers the following PageSpeed Rules:

Optimize Images

If you have access to Visual Studio 2010 (grab the trial edition here which should be compatible with the addon), you can complete this step in just a few clicks using this addon
http://visualstudiogallery.msdn.micr...77c3?SRC=VSIDE

You can also use pnggauntlet which will compress images as well.

This is great to use on new skins/themes and also non animated gifs for Smileys, Signatures, Photo Album & Group Images and Avatars that your forum stores on your server!

Please note that both of these methods produce lossless images, meaning that even though it uses various methods to decrease file size there is absolutely no visual loss in quality of the image.

For non-windows users, I suggest Imageoptim & Trimage

If you have alot of jpeg images, you can compress 10 per day with this jpegmini. Your other options with this tool are to upload jpegs to a jpegmini album which will compress the images for free which you can download soon after! Your other option is to buy the tool for $20, which will enable you to compress a unlimited amount of jpegs, although it won't compress images above 28 MegaPixels.



Optional Step 3: Add CSS Sprites.
Not compatible with VB3

This covers the following PageSpeed Rules:

Combine images using CSS sprites

Code:
Install the addon United-Forum CSS Sprites and follow all of the instructions.  Can be found in the sprite_0.6.3a.zip file.
Optional Step 4: Use a CDN
Below are 3 free CDN's. I can vouch for cloudflare but have yet to try incapsula.

1) Incapsula
2) Cloudflare *Disable the Rocketloader feature to avoid potential issues.
New article on how to setup your forum for HTTPS with cloudflare

(Optional) Step 5: Make a free Server Optimization request

Now that you've done all of the steps above, there is one final thing left to do if you are using a vps or dedi, tweak the Server! You can go here to request a free tuneup:
http://www.vbulletin.com/forum/forum...-configuration

Here's one additional trick to help improve your seo btw:
[SEO Enhancement] Replace "reload this page" to the thread title [v1.00]

Enjoy!

Optional (Recommended) Step 7: Lazy load images.

Lazy Load will delay the loading of images outside of viewpoint to make the page load faster. That is, images in the visible part of the web page are only loaded and remaining images are loaded when visitor scrolls down the page, at some times it can even helps to save bandwidth.

Consider linking to us at http://video-game-chat.com/forum to help show your appreciation, since you'll be saving bandwith, reducing the loading time and thus keeping more visitors who visit your site. And impoving seo as google is now factoring in loading times into it's algorithms.

Test your page speed & yslow score's
If you would like to test your website and see what changes need to be made while you follow any part of this guide you can do so at several sites:

GTMetrix
Webpage Test
Pingdom

Here's a new htaccess that I've been testing, it's pretty solid so far. Simply throw in your url rewrite rules (for friendly urls).... this part may confuse people... they are usually located near the top of an existing htaccess file. Example of what rewrite rules look like...

Code:
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

# Forum
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]
Throw that in between the #add your friendly url rewrite rules below. lines and your set! Another identifier is to look to see if the threads, forums, members etc are being affected by any rules in the old .htaccess... if so.. throw that in and you should have no problems.

Code:
# Author: Final Kaoss (aka: Extreme-Gaming)
# Version 3.2
# Special Thanks Goes to W3Total Cache for much of the htaccess rules
RewriteEngine on

# This file is only needed if you have set the Forum Component URL in your admincp and you are
# using the mod_rewrite option for friendly urls.  If this is the case, copy this file
# to your forum component stub directory.

# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your forum component directory.  
#If your site is located at site.com/forum, then go down one line uncomment (remove the #) and replace /vbtest/ with /forum/
# RewriteBase /vbtest/

# If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.
 Options -MultiViews
#add your friendly url rewrite rules below.

#stop adding your friendly url rewrite rules here.


#Deny attempts to view the Htaccess file.
<Files .htaccess>
Order allow,deny
Deny from all
</Files>


# BEGIN W3TC Browser Cache
<IfModule mod_mime.c>
    AddType text/css .css
    AddType application/javascript .js
    AddType application/x-javascript .js
    AddType text/html .html .htm
    AddType text/richtext .rtf .rtx
    AddType image/svg+xml .svg .svgz
    AddType text/plain .txt
    AddType text/xsd .xsd
    AddType text/xsl .xsl
    AddType text/xml .xml
    AddType video/asf .asf .asx .wax .wmv .wmx
    AddType video/avi .avi
    AddType image/bmp .bmp
    AddType application/java .class
    AddType video/divx .divx
    AddType application/msword .doc .docx
    AddType application/x-msdownload .exe
    AddType image/gif .gif
    AddType application/x-gzip .gz .gzip
    AddType image/x-icon .ico
    AddType image/jpeg .jpg .jpeg .jpe
    AddType application/vnd.ms-access .mdb
    AddType audio/midi .mid .midi
    AddType video/quicktime .mov .qt
    AddType audio/mpeg .mp3 .m4a
    AddType video/mp4 .mp4 .m4v
    AddType video/mpeg .mpeg .mpg .mpe
    AddType application/vnd.ms-project .mpp
    AddType application/vnd.oasis.opendocument.database .odb
    AddType application/vnd.oasis.opendocument.chart .odc
    AddType application/vnd.oasis.opendocument.formula .odf
    AddType application/vnd.oasis.opendocument.graphics .odg
    AddType application/vnd.oasis.opendocument.presentation .odp
    AddType application/vnd.oasis.opendocument.spreadsheet .ods
    AddType application/vnd.oasis.opendocument.text .odt
    AddType audio/ogg .ogg
    AddType application/pdf .pdf
    AddType image/png .png
    AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
    AddType audio/x-realaudio .ra .ram
    AddType application/x-shockwave-flash .swf
    AddType application/x-tar .tar
    AddType image/tiff .tif .tiff
    AddType audio/wav .wav
    AddType audio/wma .wma
    AddType application/vnd.ms-write .wri
    AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
    AddType application/zip .zip
</IfModule>
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css A31536000
    ExpiresByType application/x-javascript A31536000
    ExpiresByType text/html A3600
    ExpiresByType text/richtext A3600
    ExpiresByType image/svg+xml A3600
    ExpiresByType text/plain A3600
    ExpiresByType text/xsd A3600
    ExpiresByType text/xsl A3600
    ExpiresByType text/xml A3600
    ExpiresByType video/asf A31536000
    ExpiresByType video/avi A31536000
    ExpiresByType image/bmp A31536000
    ExpiresByType application/java A31536000
    ExpiresByType video/divx A31536000
    ExpiresByType application/msword A31536000
    ExpiresByType application/x-msdownload A31536000
    ExpiresByType image/gif A31536000
    ExpiresByType application/x-gzip A31536000
    ExpiresByType image/x-icon A31536000
    ExpiresByType image/jpeg A31536000
    ExpiresByType application/vnd.ms-access A31536000
    ExpiresByType audio/midi A31536000
    ExpiresByType video/quicktime A31536000
    ExpiresByType audio/mpeg A31536000
    ExpiresByType video/mp4 A31536000
    ExpiresByType video/mpeg A31536000
    ExpiresByType application/vnd.ms-project A31536000
    ExpiresByType application/vnd.oasis.opendocument.database A31536000
    ExpiresByType application/vnd.oasis.opendocument.chart A31536000
    ExpiresByType application/vnd.oasis.opendocument.formula A31536000
    ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
    ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
    ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
    ExpiresByType application/vnd.oasis.opendocument.text A31536000
    ExpiresByType audio/ogg A31536000
    ExpiresByType application/pdf A31536000
    ExpiresByType image/png A31536000
    ExpiresByType application/vnd.ms-powerpoint A31536000
    ExpiresByType audio/x-realaudio A31536000
    ExpiresByType application/x-shockwave-flash A31536000
    ExpiresByType application/x-tar A31536000
    ExpiresByType image/tiff A31536000
    ExpiresByType audio/wav A31536000
    ExpiresByType audio/wma A31536000
    ExpiresByType application/vnd.ms-write A31536000
    ExpiresByType application/vnd.ms-excel A31536000
    ExpiresByType application/zip A31536000
</IfModule>


# BEGIN Compress text files
<ifModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
  AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
  AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
  AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
  AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
  AddOutputFilterByType DEFLATE font/truetype font/opentype


  BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</ifModule>
# END Compress text files
 
 
# BEGIN Cache-Control Headers
<ifModule mod_headers.c>
Header set Connection keep-alive 
  <filesMatch "\.(ico|jpe?g|png|gif|swf)$">
    Header set Cache-Control "public"
  </filesMatch>
  <filesMatch "\.(css)$">
    Header set Cache-Control "public"
  </filesMatch>
  <filesMatch "\.(js)$">
    Header set Cache-Control "private"
  </filesMatch>
  <filesMatch "\.(x?html?|php)$">
    Header set Cache-Control "private, must-revalidate"
  </filesMatch>
</ifModule>
# END Cache-Control Headers
 
# BEGIN Turn ETags Off
FileETag None
# END Turn ETags Off




# proc/self/environ? no way!
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|[|\%[0-9A-Z]{0,2})

##
##&nbsp; Commented version of Rewrite rules attributed to Ronald van den Heetkamp
##&nbsp; Comments by http://bodvoc.com
#
# Prevent use of specified methods in HTTP Request
RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK) [NC,OR]
# Block out use of illegal or unsafe characters in the HTTP Request
RewriteCond %{THE_REQUEST} ^.*(\\r|\\n|%0A|%0D).* [NC,OR]
# Block out use of illegal or unsafe characters in the Referer Variable of the HTTP Request
RewriteCond %{HTTP_REFERER} ^(.*)(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Block out use of illegal or unsafe characters in any cookie associated with the HTTP Request
RewriteCond %{HTTP_COOKIE} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Block out use of illegal characters in URI or use of malformed URI
RewriteCond %{REQUEST_URI} ^/(,|;|:|<|>|">|"<|/|\\\.\.\\).{0,9999}.* [NC,OR]
# NOTE - disable this rule if your site is integrated with Payment Gateways such as PayPal 
# Block out  use of empty User Agent Strings
RewriteCond %{HTTP_USER_AGENT} ^$ [OR]
# Block out  use of User Agent Strings beginning with java, curl or wget
RewriteCond %{HTTP_USER_AGENT} ^(java|curl|wget).* [NC,OR]
# Block out  use of User Agent Strings containing specific robot (crawler) identifiers
RewriteCond %{HTTP_USER_AGENT} ^.*(winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner).* [NC,OR]
# Block out  use of User Agent Strings containing references to specific crawler libraries
RewriteCond %{HTTP_USER_AGENT} ^.*(libwww-perl|curl|wget|python|nikto|scan).* [NC,OR]
# Block out  use of illegal or unsafe characters in the User Agent variable
RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
# Measures to block out  SQL injection attacks
RewriteCond %{QUERY_STRING} ^.*(;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|cast|set|declare|drop|update|md5|benchmark).* [NC,OR]
# Block out  reference to localhost/loopback/127.0.0.1 in the Query String
RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* [NC,OR]
# Block out  use of illegal or unsafe characters in the Query String variable
RewriteCond %{QUERY_STRING} ^.*(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC]
#
## End of commented Rewrite directives
#
Reply With Quote
  #112  
Old 02-07-2013, 03:55 AM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*Update, three easy to use and free services that help with static content contribution has been added, some of which act as a CDN aside from just recommending cloudflare as I did previously.
Reply With Quote
  #113  
Old 02-25-2013, 12:03 PM
synseal's Avatar
synseal synseal is offline
 
Join Date: Apr 2009
Posts: 334
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by final kaoss View Post
Fixing login issues with vbulletin 4.

found this recommendation about the login issue that you are experiencing. You may want to set the settings similar:
I would suggest you add your domains to your white list in vb options and then your cookies in vb and photopost set like this
cookie path /
cookie prefix bb
cookie domain .mysite.com
Example..
.www.video-game-chat.com


I have found that if I log into the front page the username is not showing at the top. However, if I login when checking a subforum, I am able to login successfully. I was also able to reply to the thread http://vgchat.info/forum/threads/166...me-3DS-Trailer without issues while being logged in.

Disable vbulletin content caching (since apache is handling that now)

AdminCP > Options > Server Settings and Optimization Options > Disable Content Caching: Set to yes

*Note these changes did not show immediately for me but they did show that they were working for me after roughly 15 minutes.
I am also experiencing this issue logging in and so are other members after adding the vbseo version of the .htaccess.

Where is this whitelist in vboptions also where is this setting "vb and photopost"?.

Never seen these options before neither do I have anything called whitelist or photopost in vb options.

Can you elaborate on this please?.
Reply With Quote
  #114  
Old 02-25-2013, 02:41 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't use photopost but you can adjust the cookies here:
Admin CP > Options > Cookies and HTTP Header Options
and you can find the whitelist options here:
Admin CP > Options > General Settings
Reply With Quote
  #115  
Old 03-12-2013, 07:13 PM
coolbreeze86 coolbreeze86 is offline
 
Join Date: Jan 2013
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

have a small doubt,

where to add the content i have two .htaccess one in domain root and the other in www.domain.com/forums. mine is vb4.1.5 with vbseo.

--------------- Added [DATE]1363121902[/DATE] at [TIME]1363121902[/TIME] ---------------

hi any serious help will be appreciated,

i had changed the .htaccess but sub forums are not opening just leading to 404 error pages. any help plssss
Reply With Quote
  #116  
Old 03-17-2013, 03:27 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you need to edit the one in the forum root.

Also since your using vbseo, use this htaccess and edit it to reflect your forum path. If your Friendly Rewrite Rules are different then edit it below.

PHP Code:
# Author: Final Kaoss 
# Version 2.8
# Special Thanks Goes to W3Total Cache for much of the htaccess rules
# Downloaded from: https://vborg.vbsupport.ru/showthread.php?t=288429
RewriteEngine on

#Friendly Rewrite Rules Start

# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On

# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums/)
#RewriteBase /

#RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
#RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$[L]

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap|api\.php)
RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteCond 
%{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php [L,QSA]


#Friendly Rewrite Rules End

#Deny attempts to view the Htaccess file.
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
# BEGIN Browser Caching/Headers
<IfModule mod_mime.c>
        
AddType text/css .css
        AddType text
/richtext .rtf .rtx
        AddType image
/svg+xml .svg .svgz
        AddType text
/plain .txt
        AddType text
/xsd .xsd
        AddType text
/xsl .xsl
        AddType video
/asf .asf .asx .wax .wmv .wmx
        AddType video
/avi .avi
        AddType image
/bmp .bmp
        AddType application
/java .class
        
AddType video/divx .divx
        AddType application
/msword .doc .docx
        AddType application
/x-msdownload .exe
        AddType image
/gif .gif
        AddType application
/x-gzip .gz .gzip
        AddType image
/x-icon .ico
        AddType image
/jpeg .jpg .jpeg .jpe
        AddType application
/vnd.ms-access .mdb
        AddType audio
/midi .mid .midi
        AddType video
/quicktime .mov .qt
        AddType audio
/mpeg .mp3 .m4a
        AddType video
/mp4 .mp4 .m4v
        AddType video
/mpeg .mpeg .mpg .mpe
        AddType application
/vnd.ms-project .mpp
        AddType application
/vnd.oasis.opendocument.database .odb
        AddType application
/vnd.oasis.opendocument.chart .odc
        AddType application
/vnd.oasis.opendocument.formula .odf
        AddType application
/vnd.oasis.opendocument.graphics .odg
        AddType application
/vnd.oasis.opendocument.presentation .odp
        AddType application
/vnd.oasis.opendocument.spreadsheet .ods
        AddType application
/vnd.oasis.opendocument.text .odt
        AddType audio
/ogg .ogg
        AddType application
/pdf .pdf
        AddType image
/png .png
        AddType application
/vnd.ms-powerpoint .pot .pps .ppt .pptx
        AddType audio
/x-realaudio .ra .ram
        AddType application
/x-shockwave-flash .swf
        AddType application
/x-tar .tar
        AddType image
/tiff .tif .tiff
        AddType audio
/wav .wav
        AddType audio
/wma .wma
        AddType application
/vnd.ms-write .wri
        AddType application
/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
        AddType application
/zip .zip
</IfModule>
<
IfModule mod_expires.c>
        
ExpiresActive On
        ExpiresByType text
/css A2628000
        ExpiresByType text
/richtext A3600
        ExpiresByType image
/svg+xml A3600
        ExpiresByType text
/plain A3600
        ExpiresByType text
/xsd A3600
        ExpiresByType text
/xsl A3600
        ExpiresByType video
/asf A2628000
        ExpiresByType video
/avi A2628000
        ExpiresByType image
/bmp A2628000
        ExpiresByType application
/java A2628000
        ExpiresByType video
/divx A2628000
        ExpiresByType application
/msword A2628000
        ExpiresByType application
/x-msdownload A2628000
        ExpiresByType image
/gif A2628000
        ExpiresByType application
/x-gzip A2628000
        ExpiresByType image
/x-icon A2628000
        ExpiresByType image
/jpeg A2628000
        ExpiresByType application
/vnd.ms-access A2628000
        ExpiresByType audio
/midi A2628000
        ExpiresByType video
/quicktime A2628000
        ExpiresByType audio
/mpeg A2628000
        ExpiresByType video
/mp4 A2628000
        ExpiresByType video
/mpeg A2628000
        ExpiresByType application
/vnd.ms-project A2628000
        ExpiresByType application
/vnd.oasis.opendocument.database A2628000
        ExpiresByType application
/vnd.oasis.opendocument.chart A2628000
        ExpiresByType application
/vnd.oasis.opendocument.formula A2628000
        ExpiresByType application
/vnd.oasis.opendocument.graphics A2628000
        ExpiresByType application
/vnd.oasis.opendocument.presentation A2628000
        ExpiresByType application
/vnd.oasis.opendocument.spreadsheet A2628000
        ExpiresByType application
/vnd.oasis.opendocument.text A2628000
        ExpiresByType audio
/ogg A2628000
        ExpiresByType application
/pdf A2628000
        ExpiresByType image
/png A2628000
        ExpiresByType application
/vnd.ms-powerpoint A2628000
        ExpiresByType audio
/x-realaudio A2628000
        ExpiresByType application
/x-shockwave-flash A2628000
        ExpiresByType application
/x-tar A2628000
        ExpiresByType image
/tiff A2628000
        ExpiresByType audio
/wav A2628000
        ExpiresByType audio
/wma A2628000
        ExpiresByType application
/vnd.ms-write A2628000
        ExpiresByType application
/vnd.ms-excel A2628000
        ExpiresByType application
/zip A2628000
</IfModule>
<
IfModule mod_deflate.c>
        <
IfModule mod_setenvif.c>
                
BrowserMatch ^Mozilla/4 gzip-only-text/html
                BrowserMatch 
^Mozilla/4\.0[678no-gzip
                BrowserMatch 
\bMSIE !no-gzip !gzip-only-text/html
                BrowserMatch 
\bMSI[E] !no-gzip !gzip-only-text/html
        
</IfModule>
        <
IfModule mod_headers.c>
                
Header append Vary User-Agent env=!dont-vary
        
</IfModule>
        <
IfModule mod_filter.c>
                
AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
        
</IfModule>
</
IfModule>
<
FilesMatch "\.(css|CSS|)$">
        <
IfModule mod_headers.c>
                
Header set Pragma "public"
                
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
        
</IfModule>
        
FileETag MTime Size
        
<IfModule mod_headers.c>
                 
Header set X-Powered-By "Step by Step guide to speed up your VB5"
        
</IfModule>
</
FilesMatch>
<
FilesMatch "\.(rtf|rtx|svg|svgz|txt|xsd|xsl|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|)$">
        <
IfModule mod_headers.c>
                
Header set Pragma "public"
                
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
        
</IfModule>
        
FileETag MTime Size
        
<IfModule mod_headers.c>
                 
Header set X-Powered-By "Step by Step guide to speed up your VB5"
        
</IfModule>
</
FilesMatch>
<
FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SWF|TAR|TIF|TIFF|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
        <
IfModule mod_headers.c>
                
Header set Pragma "public"
                
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
        
</IfModule>
        
FileETag MTime Size
        
<IfModule mod_headers.c>
                 
Header set X-Powered-By "Step by Step guide to speed up your VB4"
        
</IfModule>
</
FilesMatch>
# End Browser Caching/Headers 
Reply With Quote
  #117  
Old 04-08-2013, 12:28 PM
mykkal's Avatar
mykkal mykkal is offline
 
Join Date: May 2007
Location: Atlanta, GA
Posts: 485
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey there,

I installed the additions to my htacess. However now I cannot login. I can get in the ACP and login...somehow that was not affected but I cannot login/logout from the frontend.

I'm using 3.8.7. Not sure what to do here. The options for fixing this in the post don't exist. for VB3.8.7.

Quote:
Originally Posted by final kaoss View Post
If you are using vbulletin 4 with vbseo or if your using vb3.8.x, simply add this below your rewrite rules in your existing htaccess file to enable caching.

This covers the following Pagespeed Rules.

Leverage browser caching
Specify a cache validator
Enable gzip compression

This helps to cache nearly any file type that you may add in your attachment options (if you allow people to upload music files, zip files, rar files etc.. see the list lol)
Reply With Quote
  #118  
Old 04-08-2013, 04:13 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you try the whitelisting tip? It's been forever since I used vb3, the options for it should be available though.

https://vborg.vbsupport.ru/showpost....44&postcount=3
Reply With Quote
  #119  
Old 04-10-2013, 07:52 PM
DGrey2011 DGrey2011 is offline
 
Join Date: Dec 2010
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This guide shows in the 1st step how to do these:

Leverage browser caching
Specify a cache validator
Enable gzip compression

I already have set on the server the gzip compression and I have a cache validator specified.

So, I just need to add in the .htaccess the part about the Leverage browser caching. But I don't know exactly which part of the code you gave is reffering to that.
Please help?
Reply With Quote
  #120  
Old 04-11-2013, 01:49 PM
bfdzio bfdzio is offline
 
Join Date: Oct 2007
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by apokphp View Post
I'm having trouble getting the mod rewrite to work properly on a clean 4.2 suite install.

http://www.forgeofreason.com/forum/forum.php

It's set to mod rewrite.
vb is installed in the /forum/ directory.
Currently, there is nothing in the root directory, but I'd like to have the CMS at the root.
All the links (forum, what's new, usercp, blogs, etc...) work fine w/ the mod rewrite. However, it is only the Articles (or CMS) that doesn't work, and it returns a 404 page not found error. It's url is http://www.forgeofreason.com/forum/content.php

Did I do something wrong?

I did edit your sample htaccess by uncommenting 2 lines (but am not sure if I should have):

# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your forum component directory.
RewriteBase /forum/

# If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.
Options -MultiViews
Quote:
Originally Posted by final kaoss View Post
I don't own the vbsuite but it looks like you sorted it out
@final kaoss, do you have any solution for this by chance? I know you don't have vbsuite but I can't get my CMS to work and thing this is what is doing it.

It tries to go to content.php but redirects and ends up in forum/content/ which does not exist.
Reply With Quote
  #121  
Old 04-12-2013, 07:21 PM
final kaoss final kaoss is offline
 
Join Date: Apr 2006
Posts: 1,314
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try using this.

PHP Code:
# Author: Final Kaoss (aka: Extreme-Gaming)
# Version 2.7
# Special Thanks Goes to W3Total Cache for much of the htaccess rules
RewriteEngine on

# This file is only needed if you have set the Forum Component URL in your admincp and you are 
# using the mod_rewrite option for friendly urls.  If this is the case, copy this file
# to your forum component stub directory.

# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your forum component directory.
# RewriteBase /vbtest/

# If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.
 
Options -MultiViews

RewriteCond 
%{REQUEST_FILENAME} -[OR]
RewriteCond %{REQUEST_FILENAME} -[OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule 
^.*$ - [NC,L]

# Forum
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]
RewriteRule ^blogs/.* blog.php [QSA]
RewriteRule ^entries/.* entry.php [QSA]


RewriteCond %{REQUEST_FILENAME} -[OR]
RewriteCond %{REQUEST_FILENAME} -[OR]
RewriteCond %{REQUEST_FILENAME} -d

RewriteRule 
^.*$ - [NC,L]

# MVC
RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$[QSA]

# Check MVC result
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule 
^(.*)$ - [NC,L]
RewriteRule ^(.*)$ - [R=404,L]



#Deny attempts to view the Htaccess file.
<Files .htaccess>
Order allow,deny
Deny from all
</Files>
# BEGIN Browser Caching/Headers
<IfModule mod_mime.c>
    
AddType text/css .css
    AddType text
/richtext .rtf .rtx
    AddType image
/svg+xml .svg .svgz
    AddType text
/plain .txt
    AddType text
/xsd .xsd
    AddType text
/xsl .xsl
    AddType video
/asf .asf .asx .wax .wmv .wmx
    AddType video
/avi .avi
    AddType image
/bmp .bmp
    AddType application
/java .class
    
AddType video/divx .divx
    AddType application
/msword .doc .docx
    AddType application
/x-msdownload .exe
    AddType image
/gif .gif
    AddType application
/x-gzip .gz .gzip
    AddType image
/x-icon .ico
    AddType image
/jpeg .jpg .jpeg .jpe
    AddType application
/vnd.ms-access .mdb
    AddType audio
/midi .mid .midi
    AddType video
/quicktime .mov .qt
    AddType audio
/mpeg .mp3 .m4a
    AddType video
/mp4 .mp4 .m4v
    AddType video
/mpeg .mpeg .mpg .mpe
    AddType application
/vnd.ms-project .mpp
    AddType application
/vnd.oasis.opendocument.database .odb
    AddType application
/vnd.oasis.opendocument.chart .odc
    AddType application
/vnd.oasis.opendocument.formula .odf
    AddType application
/vnd.oasis.opendocument.graphics .odg
    AddType application
/vnd.oasis.opendocument.presentation .odp
    AddType application
/vnd.oasis.opendocument.spreadsheet .ods
    AddType application
/vnd.oasis.opendocument.text .odt
    AddType audio
/ogg .ogg
    AddType application
/pdf .pdf
    AddType image
/png .png
    AddType application
/vnd.ms-powerpoint .pot .pps .ppt .pptx
    AddType audio
/x-realaudio .ra .ram
    AddType application
/x-shockwave-flash .swf
    AddType application
/x-tar .tar
    AddType image
/tiff .tif .tiff
    AddType audio
/wav .wav
    AddType audio
/wma .wma
    AddType application
/vnd.ms-write .wri
    AddType application
/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
    AddType application
/zip .zip
</IfModule>
<
IfModule mod_expires.c>
    
ExpiresActive On
    ExpiresByType text
/css A2628000
    ExpiresByType text
/richtext A3600
    ExpiresByType image
/svg+xml A3600
    ExpiresByType text
/plain A3600
    ExpiresByType text
/xsd A3600
    ExpiresByType text
/xsl A3600
    ExpiresByType video
/asf A2628000
    ExpiresByType video
/avi A2628000
    ExpiresByType image
/bmp A2628000
    ExpiresByType application
/java A2628000
    ExpiresByType video
/divx A2628000
    ExpiresByType application
/msword A2628000
    ExpiresByType application
/x-msdownload A2628000
    ExpiresByType image
/gif A2628000
    ExpiresByType application
/x-gzip A2628000
    ExpiresByType image
/x-icon A2628000
    ExpiresByType image
/jpeg A2628000
    ExpiresByType application
/vnd.ms-access A2628000
    ExpiresByType audio
/midi A2628000
    ExpiresByType video
/quicktime A2628000
    ExpiresByType audio
/mpeg A2628000
    ExpiresByType video
/mp4 A2628000
    ExpiresByType video
/mpeg A2628000
    ExpiresByType application
/vnd.ms-project A2628000
    ExpiresByType application
/vnd.oasis.opendocument.database A2628000
    ExpiresByType application
/vnd.oasis.opendocument.chart A2628000
    ExpiresByType application
/vnd.oasis.opendocument.formula A2628000
    ExpiresByType application
/vnd.oasis.opendocument.graphics A2628000
    ExpiresByType application
/vnd.oasis.opendocument.presentation A2628000
    ExpiresByType application
/vnd.oasis.opendocument.spreadsheet A2628000
    ExpiresByType application
/vnd.oasis.opendocument.text A2628000
    ExpiresByType audio
/ogg A2628000
    ExpiresByType application
/pdf A2628000
    ExpiresByType image
/png A2628000
    ExpiresByType application
/vnd.ms-powerpoint A2628000
    ExpiresByType audio
/x-realaudio A2628000
    ExpiresByType application
/x-shockwave-flash A2628000
    ExpiresByType application
/x-tar A2628000
    ExpiresByType image
/tiff A2628000
    ExpiresByType audio
/wav A2628000
    ExpiresByType audio
/wma A2628000
    ExpiresByType application
/vnd.ms-write A2628000
    ExpiresByType application
/vnd.ms-excel A2628000
    ExpiresByType application
/zip A2628000
</IfModule>
<
IfModule mod_deflate.c>
    <
IfModule mod_setenvif.c>
        
BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch 
^Mozilla/4\.0[678no-gzip
        BrowserMatch 
\bMSIE !no-gzip !gzip-only-text/html
        BrowserMatch 
\bMSI[E] !no-gzip !gzip-only-text/html
    
</IfModule>
    <
IfModule mod_headers.c>
        
Header append Vary User-Agent env=!dont-vary
    
</IfModule>
    <
IfModule mod_filter.c>
        
AddOutputFilterByType DEFLATE text/css application/x-javascript text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
    
</IfModule>
</
IfModule>
<
FilesMatch "\.(css|CSS|)$">
    <
IfModule mod_headers.c>
        
Header set Pragma "public"
        
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    
</IfModule>
    
FileETag MTime Size
    
<IfModule mod_headers.c>
         
Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
    
</IfModule>
</
FilesMatch>
<
FilesMatch "\.(rtf|rtx|svg|svgz|txt|xsd|xsl|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|)$">
    <
IfModule mod_headers.c>
        
Header set Pragma "public"
        
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    
</IfModule>
    
FileETag MTime Size
    
<IfModule mod_headers.c>
         
Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
    
</IfModule>
</
FilesMatch>
<
FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|RA|RAM|SWF|TAR|TIF|TIFF|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
    <
IfModule mod_headers.c>
        
Header set Pragma "public"
        
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    
</IfModule>
    
FileETag MTime Size
    
<IfModule mod_headers.c>
         
Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
    
</IfModule>
</
FilesMatch>
# End Browser Caching/Headers 
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:06 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05719 seconds
  • Memory Usage 2,561KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (20)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete