MyBB Community Forums

Full Version: Google Seo - .htaccess - Ability Cache and GZip
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Page Speed Plugin by Mozilla tells me to enable Cache and GZip.
What can I add to .htaccess file?

This is all my .htaccess:
<IfModule mod_security.c>
	# Turn off mod_security filtering.
	SecFilterEngine Off

	# The below probably isn't needed, but better safe than sorry.
	SecFilterScanPOST Off
</IfModule>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
#   the setting enabled in the Admin CP and you have this file
#   named .htaccess
#
<IfModule mod_rewrite.c>
RewriteEngine on

# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /forum/

# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteRule ^([^&]*)&(.*)$ http://www.mysite/forum/$1?$2 [L,QSA,R=301]

# Google SEO 404:
ErrorDocument 404 /forum/misc.php?google_seo_error=404

# Google SEO Sitemap:
RewriteRule ^sitemap-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]
	
# Google SEO URL Forums:
RewriteRule ^F-([^./]+)\.html$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]

# Google SEO URL Threads:
RewriteRule ^T-([^./]+)\.html$ showthread.php?google_seo_thread=$1 [L,QSA,NC]

# Google SEO URL Announcements:
RewriteRule ^A-([^./]+)\.html$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]

# Google SEO URL Users:
RewriteRule ^U-([^./]+)\.html$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]

# Google SEO URL Calendars:
RewriteRule ^C-([^./]+)\.html$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]

# Google SEO URL Events:
RewriteRule ^E-([^./]+)\.html$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

	<IfModule mod_env.c>
		SetEnv SEO_SUPPORT 1
	</IfModule>
</IfModule>


#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#

<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml
</IfModule>


Thanks
Add this:
 <IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE application/javascript text/css text/html text/xml
</IfModule>
#
# cache control
#
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType image/gif A2592000
    ExpiresByType image/png A2592000
    ExpiresByType image/jpeg A2592000
    ExpiresByType application/x-javascript A2592000
    ExpiresByType text/css A2592000
</IfModule>

#
# deflate
#
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/x-js text/css application/javascript
</IfModule>
Don't work... why? ç_ç
(2011-12-20, 03:27 PM)djqwert Wrote: [ -> ]Don't work... why? ç_ç

Your host does not seems to support mod_deflate ,