Alright, I run a board using the Yabb SE software. It's a php/sql combo. What I'm trying to do is have my dynamic url's replaced with static ones to get my page more spiderable. This is how far I've gotten.
A url all the way to viewing a specific thread has this format: http://www.domain.net/forum/index.php?board=2;action=display;threadid=97
So at the end of my index.php I added this function:
function ob_url_rewrite($buffer)
{
return preg_replace(
array('~"' . preg_quote($scripturl, '~') . '\?board=(\d+)"~', '~"' . preg_quote($scripturl, '~') . '\?board=(\d+);action=display;threadid=(\d+)"~', '~"' . preg_quote($scripturl, '~') . '\?board=(\d+);action=display;threadid=(\d+);start=(\d+)"~'),
array('"' . $boardurl . '_\\1.html"', '"' . $boardurl . '_\\1_\\2.html"', '"' . $boardurl . '_\\1_\\2_\\3.html"'),
$buffer);
}
And then where it's loading all the settings further up the script I have:
if ($modSettings['enableCompressedOutput'] && preg_match('/gzip/i', getEnv('HTTP_ACCEPT_ENCODING')) && @ini_get('zlib.output_compression') != '1')
{
ob_start('ob_url_rewrite');
ob_start("ob_gzhandler");
}
else
ob_start('ob_url_rewrite');
Then, in my .htaccess file I put this:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteRule ^(.*)forum_(\d+).html $1forum/index.php?board=$2
RewriteRule ^(.*)forum_(\d+)_(\d+).html $1forum/index.php?board=$2;action=display;threadid=$3
RewriteRule ^(.*)forum_(\d+)_(\d+)_(\d+).html $1forum/index.php?board=$2;action=display;threadid=$3;start=$4
After doing all of this...I thought it would work...but the url's don't change. The site still works, but the url's are still dynamic. Anyone see what is wrong/missing?
Thanks much,
Methonis