After I optimized the caching for my non-dynamic pages using apache modules mod_headers and mod_expiresI began to learn about phpbb seo.. First I used a mod on the forum, where instead of
http://www.example.com/htaccess/index.php the url is
http://www.example.com/htaccess/htaccess-vc1.html
and for
http://www.example.com/htaccess/viewtopic.php?t=5
its
http://www.example.com/htaccess/caching-using-mod-expires-with-expires-vt5.html
This rewrites internally all .html files to .php
Code:
RewriteEngine On
RewriteBase /
RewriteRule (.*)\.html$ $1.php [L,T=application/x-httpd-php]
Forcing any files to be a certain type of file:Code:
<Files index.php>
ForceType application/x-httpd-php
</Files>
Name php files .htmlCode:
AddType application/x-httpd-php .html
If using phpbb:Removing SID for guests and using phpBB SEO mod rewrites
Gives you an htaccess like this-
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^s/(.*)\.pl$ /cgi-bin/$1.php [L]
# FORUMS PAGES
########################
# FORUM PROTECTION RULE
RewriteRule ^htaccess/.+/([^/]+\.html)$ /htaccess/index.php [R=301,L]
# CATEGORIES
RewriteRule ^htaccess/.+-vc([0-9]+)\.html$ /htaccess/index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^htaccess/.+-vf([0-9]+)-([0-9]+)\.html$ /htaccess/viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^htaccess/.+-vf([0-9]+)\.html$ /htaccess/viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^htaccess/.+-vt([0-9]+)-([0-9]+)\.html$ /htaccess/viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^htaccess/.+-vt([0-9]+)\.html$ /htaccess/viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^htaccess/post([0-9]+)\.html$ /htaccess/viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^htaccess/member([0-9]+)\.html$ /htaccess/profile.php?mode=viewprofile&u=$1 [QSA,L]
Now my question after doing all this to get my phpbb forum optimized is:
Do search engines care about the "expires, etag, last-modification, and cache-control headers?"
I can't find any information about creating real static pages from phpbb, so that apache can create the etag headers and last-modification headers automatically. I can't even get mod_headers to work with phpbb.
It stands to reason that crawlers would record the last-modified time to display time-based results, so how do they look upon pages that don't have any of these headers?
At this point I am just going to modify the page_header.php file to generate my own Last-modified and expires and cache-control headers and I will experiment with creating an etag.. the md5 function isn't very effiecient though.. I think I'll just start out by giving the expire and last-modified times to expire 10 minutes after requesting the file.. I also want to try and base the last-modified time off of the last post or edit to the data on the page.. what a nightmare!
Anyone have any suggestions? I'm googled out at this point..