RewriteEngine On
RewriteRule ^forum.* index.php [L,NC]
RewriteRule ^post-([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?p=$1&highlight=$2 [L,NC]
RewriteRule ^post-([0-9]*).* viewtopic.php?p=$1 [L,NC]
RewriteRule ^view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,NC]
RewriteRule ^about([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^about([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^about([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^about([0-9]*).* viewtopic.php?t=$1 [L,NC]
RewriteRule ^about([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^mark-forum([0-9]*).html* viewforum.php?f=$1&mark=topics [L,NC]
RewriteRule ^updates-topic([0-9]*).html* viewtopic.php?t=$1&watch=topic [L,NC]
RewriteRule ^stop-updates-topic([0-9]*).html* viewtopic.php?t=$1&unwatch=topic [L,NC]
RewriteRule ^forum-([0-9]*).html viewforum.php?f=$1 [L,NC]
RewriteRule ^forum-([0-9]*).* viewforum.php?f=$1 [L,NC]
RewriteRule ^topic-([0-9]*)-([0-9]*)-([0-9]*).* viewforum.php?f=$1&topicdays=$2&start=$3 [L,NC]
RewriteRule ^ptopic([0-9]*).* viewtopic.php?t=$1&view=previous [L,NC]
RewriteRule ^ntopic([0-9]*).* viewtopic.php?t=$1&view=next [L,NC]
BTW, this must be one of the most viewed threads on the net!
17) Link the user post count to a search of the user's posts (Craven de Kere)
The user search page is a good way to capture more search engine traffic. This provides a link for the spiders.
##############################################################
## MOD Title: phpBB SEO keyword URLs
## MOD Author: webmedic ([email protected]) <Brook> http://www.webmedic.net Updated to work with Blogpoint BLOG MOD by Tony Malone
## Original code from: http://www.webmasterbrain.com/forum/question-static-sef-urls-for-phpbb-vt34.php
## MOD Description: This mod makes static URLs for phpBB
## Please read the author notes BEFORE using this mod.
## Check http://www.webmedic.net/phpbb-google-msn-yahoo-seo-keyword-urls-mod-vt28667.html
## for the latest version or to get help with this MOD
##
## MOD Version: 2.3.0.TM1 PLEASE NOTE: This is Webmedics keywords hack, which I have just updated for blogpoint.
## You should retain all webmedics existing author information.
## Installation Level: (Advanced)
## Installation Time: 5 Minutes
## Files To Edit: (3)
## .htaccess,
## page_header.php,
## page_footer.php,
## overall_footer.tpl
## Included Files: n/a
##############################################################
## Author Notes:
## Use this mod together with the manage bots mod already included with integramod
## Make backups and test this on a test forum if you can. This is not a typical mod.
## This version is not like all the other mod rewrite and search engine optimization mods
## out there. It will make your urls into keyword phrases. to do this it rewrites the url
## to look like the topic or forum title.
## To see this mod in action please goto:
## http://www.webmedic.net/index.php
##
## LICENSE:
## Due to some issues with others taking my work and not offering proper credit
## (in as much as they have removed my credits and added their own) I have added
## a LICENSE.TXT. I have decided to license this under the RPL which states you can not
## remove my credits and if you make any modifications you have to resubmit the modifications
## to me for includion into this toolkit again. You can read the license for yourself for
## further info. It is also an open source license that has been deemed ok by osi.
##
## Along with this I now require a link to use this mod. If you don't want to have the
## linkback I will remove the requirement for a linkback for a small fee. If you are
## interested in removing the link please contact me at [email protected]
##
## All previous versions are licensed under the rpl from 6/29/2005
##
##############################################################
## MOD History:
##
## 2005-08-14 - Version 2.3.0
## - Fixes for header errors and code clean up
## - Added new characters to make url friendly function
## - I went up a whole revision number as there were quite a few little bug fixes.
## I also want to start a new thread for this.
##
## 2005-07-15 - Version 2.2.3
## - small fix for some header issues.
##
## 2005-07-03 - Version 2.2.2
## - Dissabled some of the page optimizations to fix issues with some javascripts
## and css.
## - Added keyword meta tags to the zip.
##
## 2005-06-29 - Version 2.2.1
## - Added LICENSE.TXT after finding a few other sites taking credit for this mod.
## - Added footer text for usage of this mod.
## - Changed order of the install to help with any errors that may occur durring install.
## - Fixed a few issues with overly optimizing the pages.
##
## 2005-06-24 - Version 2.2.0
## - Rewrote some of the code for the smartor album again. This time it is more
## comprehensive and should fix even unforeseen issues.
## - Added new features so that when the page is being gziped it also removes
## Unwanted comments, spaces, tabs, line feeds, and carriage returns. This also
## makes the page smaller and helps to speed things up.
##
## TODO: Fix forward and back links as well as links within threads that have multiple pages.
##
## 2005-06-21 - Version 2.1.0
## - Rewrote a good portion of the smartor album code so that it works better.
## - Added support for categories hierarchy thanks to 993ti at the
## www.webmedic.net forums.
## - Fixed major bug with phpbb were gzip was not working properly at all ever.
## This mod fixes that issue so that gzip encoding now works properly.
##
## 2005-06-19 - Version 2.0.2
## - Fixed small issue with " showing up in the url as -quot-
## This was due to phpbb changing " to " which is correct
## but still does not look good in a url. So now it is completely removed.
##
## 2005-06-14 - Version 2.0.1
## - Fixed small issue with url's not being rewritten if the site was using gzip compression.
## - Fixed some of the string replace entries to not look for more than one space
## - added <and> to the string replace functions
##
## 2005-06-07 - Version 2.0.0
## - Added ability to use with pafiledb mod
## - Added ability to use with kb mod (NOT WORKING YET)
## - Added ability to use with Smartor album mod
## - Added German umlauts & special characters (thanks to m³)
## - Modified the way links are generated somewhat.
## Hopefully the new method will catch a few things the old one did not.
##
## 2004-11-03 - Version 1.1.0
## - Added replacements for /, \, and foreign character sets.
##
## 2004-08-22 - Version 1.0.0
## - Initial public release.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
.htaccess
#
#-----[ ADD ]------------------------------------------
#
RewriteEngine On
#this may cause issues with subdirs and so I have not enabled it.
# NOTE: replace "community" directory with your forum subfolder
RewriteBase /forum/
RewriteRule [.]*-vf([0-9]*) index.php?%{QUERY_STRING}&f=$1
RewriteRule [.]*-vp([0-9]*) viewtopic.php?%{QUERY_STRING}&p=$1
RewriteRule [.]*-vt([0-9]*) viewtopic.php?%{QUERY_STRING}&t=$1
RewriteRule [.]*-vc([0-9]*) index.php?%{QUERY_STRING}&c=$1
RewriteRule [.]*-ac([0-9]*) album_cat.php?%{QUERY_STRING}&cat_id=$1
RewriteRule [.]*-at([0-9]*) album_thumbnail.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apic([0-9]*) album_pic.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apm([0-9]*) album_picm.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-full-asp([0-9]*) album_showpage.php?full=&pic_id=$1
RewriteRule [.]*-asp([0-9]*) album_showpage.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-aper([0-9]*) album_personal.php?%{QUERY_STRING}&user_id=$1
RewriteRule [.]*-dc([0-9]*) dload.php?%{QUERY_STRING}action=category&cat_id=$1
RewriteRule [.]*-df([0-9]*) dload.php?%{QUERY_STRING}action=file&file_id=$1
RewriteRule [.]*-kbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-kba([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-kbsmp kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-kbstr kb.php?mode=stats&stats=toprated
RewriteRule [.]*-kbsl kb.php?mode=stats&stats=latest
RewriteRule [.]*-pbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-pa([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-psmp kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-pstr kb.php?mode=stats&stats=toprated
RewriteRule [.]*-pbsl kb.php?mode=stats&stats=latest
RewriteRule [.]*-wl([0-9]*) weblog.php?%{QUERY_STRING}&w=$1
RewriteRule [.]*-wa([0-9]*) weblog_allentries.php?%{QUERY_STRING}&w=$1
RewriteRule [.]*-wf([0-9]*) weblog_friends.php?%{QUERY_STRING}&w=$1
RewriteRule [.]*-we([0-9]*) weblog_entry.php?%{QUERY_STRING}&w=$1
RewriteRule [.]*-wc([0-9]*) weblog_contributors.php?%{QUERY_STRING}&w=$1
RewriteRule [.]*-wr([0-9]*) weblog_rss.php?%{QUERY_STRING}&w=$1
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
//
// gzip_compression
//
$do_gzip_compress = FALSE;
if($board_config['gzip_compress'])
{
$phpver = phpversion();
if($phpver >= "4.0.4pl1")
{
if(extension_loaded("zlib"))
{
if (headers_sent() != TRUE)
{
$gz_possible = isset($HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]) && eregi("gzip, deflate",$HTTP_SERVER_VARS["HTTP_ACCEPT_ENCODING"]);
if ($gz_possible) ob_start("ob_gzhandler");
}
}
}
else if($phpver > "4.0")
{
if(strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip'))
{
if(extension_loaded("zlib"))
{
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);
header("Content-Encoding: gzip");
}
}
}
}
#
#-----[ REPLACE, WITH ]------------------------------------------
#
//
// Begin keyword urls mod
//
//while (@ob_end_flush());
ob_start();
function make_url_friendly($url)
{
$url = trim($url);
$url = strtolower($url);
// Fix for most recent topics block
// or else a b is shown in every url
$find = array('<b>',
'</b>');
$url = str_replace ($find, '', $url);
$url = preg_replace('/</0>/', '', $url);
$find = array(' ',
'"',
'&',
'\r\n',
'\n',
'/',
'\\',
'+',
'<',
'>');
$url = str_replace ($find, '-', $url);
$find = array('é',
'è',
'ë',
'ê',
'ة',
'ب',
'ث',
'ت');
$url = str_replace ($find, 'e', $url);
$find = array('ي',
'ى',
'î',
'ï',
'ح',
'ج',
'خ',
'د');
$url = str_replace ($find, 'i', $url);
$find = array('َ',
'ٍ',
'ô',
'س',
'ز',
'ش');
$url = str_replace ($find, 'o', $url);
$find = array('ِ',
'ض');
$url = str_replace ($find, 'oe', $url);
$find = array('ل',
'à',
'â',
'ء',
'ہ',
'آ');
$url = str_replace ($find, 'a', $url);
$find = array('ن',
'ؤ');
$url = str_replace ($find, 'ae', $url);
$find = array('ْ',
'ù',
'û',
'ع',
'ظ',
'غ');
$url = str_replace ($find, 'u', $url);
$find = array('ü',
'ـ');
$url = str_replace ($find, 'ue', $url);
$find = array('ك');
$url = str_replace ($find, 'ss', $url);
$find = array('ç');
$url = str_replace ($find, 'c', $url);
$find = array('/[^a-z0-9\-<>]/',
'/[\-]+/',
'/<[^>]*>/');
$repl = array('',
'-',
'');
$url = preg_replace ($find, $repl, $url);
$url = str_replace ('--', '-', $url);
return $url;
}
function rewrite_urls($content)
{
function if_query($amp)
{
if($amp != '')
{
return '?';
}
}
$url_in = array('/(?</index>]+>)(.*?)</a>/e',
'/(?</index>]+>)(.*?)</a>/e',
'/(?</viewtopic>]+>)(.*?)</a>/e',
'/(?</viewtopic>]+>)(.*?)</a>/e',
'/(?</weblog>]+>)(.*?)</a>/e',
'/(?</weblog_allentries>]+>)(.*?)</a>/e',
'/(?</weblog_friends>]+>)(.*?)</a>/e',
'/(?</weblog_entry>]+>)(.*?)</a>/e',
'/(?</weblog_contributors>]+>)(.*?)</a>/e',
'/(?</weblog_rss>]+>)(.*?)</a>/e',
'/(?</album_cat>]+>)(.*?)</a>/e',
'/(?</album_thumbnail>]+>)(.*?)</a>/e',
'/(?</album_pic>]+>)(.*?)</a>/e',
'/(?</album_picm>]+>)(.*?)</a>/e',
//'/(?</album_showpage>]+>)(<img .*?)</a>/e',
'/(?</album_showpage>]+>)(.*?)</a>/e',
'/(?</album_showpage>]+>)(.*?)</a>/e',
'/(?</album_personal>]+>)(.*?)</a>/e',
'/(?</dload>]+>)(.*?)</a>/e',
'/(?</dload>]+>)(.*?)</a>/e',
'/(?</kb>]+>)(.*?)</a>/e',
'/(?</kb>]+>)(.*?)</a>/e',
'/(?</kb>]+>)(.*?)</a>/e',
'/(?</kb>]+>)(.*?)</a>/e',
'/(?</kb>]+>)(.*?)</a>/e',
'/(?</press>]+>)(.*?)</a>/e',
'/(?</press>]+>)(.*?)</a>/e',
'/(?</press>]+>)(.*?)</a>/e',
'/(?</press>]+>)(.*?)</a>/e',
'/(?</press>]+>)(.*?)</a>/e');
$url_out = array("make_url_friendly('\\6') . '-vf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-vf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-vp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-vt\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-wl\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-wa\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-wf\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-we\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-wc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-wr\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-ac\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-at\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-apic\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-apm\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
//"'show-pic-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"'image-full-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-asp\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-aper\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-dc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-df\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-kbc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-kba\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\5') . '-kbsmp.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
"make_url_friendly('\\5') . '-kbstr.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
"make_url_friendly('\\5') . '-kbsl.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
"make_url_friendly('\\6') . '-pc\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\6') . '-pa\\1.html' . if_query('\\2') . stripslashes('\\5\\6') . '</a>'",
"make_url_friendly('\\5') . '-psmp.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
"make_url_friendly('\\5') . '-pstr.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'",
"make_url_friendly('\\5') . '-psl.html' . if_query('\\1') . stripslashes('\\4\\5') . '</a>'");
$content = preg_replace($url_in, $url_out, $content);
return $content;
}
//
// end keyword urls mod
//
#
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php
#
#-----[ FIND ]------------------------------------------
#
if ( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();
$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);
$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);
echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
}
#
#-----[ REPLACE, WITH ]------------------------------------------
#
//
// begin keyword urls mod
//
if( function_exists(ob_gzhandler) && $board_config['gzip_compress'] == 1)
{
$gzip_contents = rewrite_urls(ob_get_contents());
ob_end_clean();
ob_start('ob_gzhandler');
echo $gzip_contents;
ob_end_flush();
}
else
{
$contents = rewrite_urls(ob_get_contents());
ob_end_clean();
echo $contents;
global $dbg_starttime;
}
//
// end keyword urls mod
//
#
#-----[ OPEN ]------------------------------------------
#
/templates/THE TEMPLATE YOUR USING/overall_footer.tpl
#
#-----[ FIND ]------------------------------------------
#
Powered by <a>phpBB</a> {PHPBB_VERSION} © phpBB Group
#
#-----[ REPLACE WITH]------------------------------------------
#
Powered by <a>phpBB</a> {PHPBB_VERSION} © phpBB Group <a>SEO toolkit © 2004-2005 webmedic</a>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
RewriteEngine On
#this may cause issues with subdirs and so I have not enabled it.
#replace "community" directory with your forum subfolder
RewriteBase /community/
RewriteRule [.]*-vf([0-9]*) index.php?%{QUERY_STRING}&f=$1
RewriteRule [.]*-vp([0-9]*) viewtopic.php?%{QUERY_STRING}&p=$1
RewriteRule [.]*-vt([0-9]*) viewtopic.php?%{QUERY_STRING}&t=$1
RewriteRule [.]*-vc([0-9]*) index.php?%{QUERY_STRING}&c=$1
RewriteRule [.]*-ac([0-9]*) album_cat.php?%{QUERY_STRING}&cat_id=$1
RewriteRule [.]*-at([0-9]*) album_thumbnail.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apic([0-9]*) album_pic.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-apm([0-9]*) album_picm.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-full-asp([0-9]*) album_showpage.php?full=&pic_id=$1
RewriteRule [.]*-asp([0-9]*) album_showpage.php?%{QUERY_STRING}&pic_id=$1
RewriteRule [.]*-aper([0-9]*) album_personal.php?%{QUERY_STRING}&user_id=$1
RewriteRule [.]*-dc([0-9]*) dload.php?%{QUERY_STRING}action=category&cat_id=$1
RewriteRule [.]*-df([0-9]*) dload.php?%{QUERY_STRING}action=file&file_id=$1
RewriteRule [.]*-kbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-kba([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-kbsmp kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-kbstr kb.php?mode=stats&stats=toprated
RewriteRule [.]*-kbsl kb.php?mode=stats&stats=latest
RewriteRule [.]*-pbc([0-9]*) kb.php?%{QUERY_STRING}mode=cat&cat=$1
RewriteRule [.]*-pa([0-9]*) kb.php?%{QUERY_STRING}mode=article&k=$1
RewriteRule [.]*-psmp kb.php?mode=stats&stats=mostpopular
RewriteRule [.]*-pstr kb.php?mode=stats&stats=toprated
RewriteRule [.]*-pbsl kb.php?mode=stats&stats=latest
RewriteRule [.]*-wl([0-9]*) weblog.php?%{QUERY_STRING}&w=$1
RewriteRule [.]*-wa([0-9]*) weblog_allentries.php?%{QUERY_STRING}&w=$1
RewriteRule [.]*-wf([0-9]*) weblog_friends.php?%{QUERY_STRING}&w=$1
RewriteRule [.]*-we([0-9]*) weblog_entry.php?%{QUERY_STRING}&w=$1
RewriteRule [.]*-wc([0-9]*) weblog_contributors.php?%{QUERY_STRING}&w=$1
RewriteRule [.]*-wr([0-9]*) weblog_rss.php?%{QUERY_STRING}&w=$1
RewriteRule ^forum.* index.php [L,NC]
RewriteRule /forum/forum-([0-9]*).* /forum/viewforum.php?f=$1 [L,I]
RewriteRule /forum/forum.* /forum/index.php [L,I]
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------
#
//
// Generate logged in/logged out status
//
#
#-----[ AFTER, ADD ]------------------------------------------
#
if ( !$userdata['session_logged_in'] )
{
ob_start();
function replace_for_mod_rewrite(&$s)
{
$urlin =
array(
"'(?<!/)viewforum.php\?f=([0-9]*)&topicdays=([0-9]*)&start=([0-9]*)'",
"'(?<!/)viewforum.php\?f=([0-9]*)&mark=topics'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&watch=topic*'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&unwatch=topic*'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&highlight=*'",
"'(?<!/)viewforum.php\?f=([0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&view=previous'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&view=next'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&postdays=([0-9]*)&postorder=([a-zA-Z]*)&vote=viewresult'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&postdays=([0-9]*)&postorder=([a-zA-Z]*)&start=([0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&start=([0-9]*)&postdays=([0-9]*)&postorder=([a-zA-Z]*)&highlight=([a-zA-Z0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)&start=([0-9]*)'",
"'(?<!/)viewtopic.php\?t=([0-9]*)'",
"'(?<!/)viewtopic.php&p=([0-9]*)'",
"'(?<!/)viewtopic.php\?p=([0-9]*)'",
);
$urlout = array(
"topic-\\1-\\2-\\3.html",
"mark-forum\\1.html",
"updates-topic\\1.html",
"stop-updates-topic\\1.html",
"about\\1.html&highlight=\\2",
"forum-\\1.html",
"ptopic\\1.html",
"ntopic\\1.html",
"view-poll\\1-\\2-\\3.html",
"about\\1-\\2-\\3-\\4.html",
"about\\1.html",
"about\\1-\\2.html",
"about\\1.html",
"post-\\1.html",
"post-\\1.html",
);
$s = preg_replace($urlin, $urlout, $s);
return $s;
}
}
#
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php
#
#-----[ FIND ]------------------------------------------
#
$db->sql_close();
#
#-----[ AFTER, ADD ]------------------------------------------
#
if ( !$userdata['session_logged_in'] )
{
$contents = ob_get_contents();
ob_end_clean();
echo replace_for_mod_rewrite($contents);
global $dbg_starttime;
}
#
#-----[ OPEN ]------------------------------------------
#
C:\Program Files\Helicon\ISAPI_Rewrite\httpd.ini
#
#-----[ FIND ]------------------------------------------
#
RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]
#
#-----[ AFTER, ADD ]------------------------------------------
#
# RewriteRule /forum/forum.* /forum/index.php [L,I]
RewriteRule /forum/post-([0-9]*).html&highlight=([a-zA-Z0-9]*) /forum/viewtopic.php?p=$1&highlight=$2 [L,I]
RewriteRule /forum/post-([0-9]*).* /forum/viewtopic.php?p=$1 [L,I]
RewriteRule /forum/view-poll([0-9]*)-([0-9]*)-([a-zA-Z]*).* /forum/viewtopic.php?t=$1&postdays=$2&postorder=$3&vote=viewresult [L,I]
RewriteRule /forum/about([0-9]*).html&highlight=([a-zA-Z0-9]*) /forum/viewtopic.php?t=$1&highlight=$2 [L,I]
RewriteRule /forum/about([0-9]*).html&view=newest /forum/viewtopic.php?t=$1&view=newest [L,I]
RewriteRule /forum/about([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* /forum/viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,I]
RewriteRule /forum/about([0-9]*)-([0-9]*).* /forum/viewtopic.php?t=$1&start=$2 [L,I]
RewriteRule /forum/about([0-9]*).* /forum/viewtopic.php?t=$1 [L,I]
RewriteRule /forum/about([0-9]*).html /forum/viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,I]
RewriteRule /forum/mark-forum([0-9]*).html* /forum/viewforum.php?f=$1&mark=topics [L,I]
RewriteRule /forum/updates-topic([0-9]*).html* /forum/viewtopic.php?t=$1&watch=topic [L,I]
RewriteRule /forum/stop-updates-topic([0-9]*).html* /forum/viewtopic.php?t=$1&unwatch=topic [L,I]
RewriteRule /forum/forum-([0-9]*).html /forum/viewforum.php?f=$1 [L,I]
RewriteRule /forum/forum-([0-9]*).* /forum/viewforum.php?f=$1 [L,I]
RewriteRule /forum/topic-([0-9]*)-([0-9]*)-([0-9]*).* /forum/viewforum.php?f=$1&topicdays=$2&start=$3 [L,I]
RewriteRule /forum/ptopic([0-9]*).* /forum/viewtopic.php?t=$1&view=previous [L,I]
RewriteRule /forum/ntopic([0-9]*).* /forum/viewtopic.php?t=$1&view=next [L,I]
#
#-----[ OPEN ]------------------------------------------
#
robots.txt
Disallow: forum/post-*.html$
Disallow: forum/updates-topic.html*$
Disallow: forum/stop-updates-topic.html*$
Disallow: forum/ptopic*.html$
Disallow: forum/ntopic*.html$
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
if (!empty($db))
{
$db->sql_close();
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
if ( !$userdata['session_logged_in'] )
{
if (stristr($url, 'http://')) {
header('Location: ' . $url);
exit;
}
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
If Google sees nofollow as part of a link, it will:
NOT follow through to that page.
NOT count the link in calculating PageRank link popularity scores.
NOT count the anchor text in determining what terms the page being linked to is relevant for.