This going back to what I was saying before
http://www.able2know.com/forums/viewtopic.php?p=2033598#2033598.
I used this in the end and the search engines started to crawl the site.
The php and htaccess have been modfied changing the "about" and some other bits, but the main change that forced them to crawl and not stop at index, was adding in the host name. Since doing all this and waiting weeks to see how it worked my host has now decided to change accounts to sub domains
, so the original way will work now lol. Hopefully this will help other people who had problems like mine before though.
htaccess
Code:
RewriteRule ^forum-([0-9]*).* index.php?c=$1 [L,NC]
RewriteRule ^forums.html index.php [L,NC]
RewriteRule ^viewonline.php viewonline.php [L,NC]
RewriteRule ^profile.php profile.php [L,NC]
RewriteRule ^search.php search.php [L,NC]
RewriteRule ^login.php login.php [L,NC]
RewriteRule ^faq.php faq.php [L,NC]
RewriteRule ^memberlist.php memberlist.php [L,NC]
RewriteRule ^groupcp.php groupcp.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 ^topicid([0-9]*).html&highlight=([a-zA-Z0-9]*) viewtopic.php?t=$1&highlight=$2 [L,NC]
RewriteRule ^topicid([0-9]*).html&view=newest viewtopic.php?t=$1&view=newest [L,NC]
RewriteRule ^topicid([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).* viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4 [L,NC]
RewriteRule ^topicid([0-9]*)-([0-9]*).* viewtopic.php?t=$1&start=$2 [L,NC]
RewriteRule ^topicid([0-9]*).* viewtopic.php?t=$1 [L,NC]
RewriteRule ^topicid([0-9]*).html viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5 [L,NC]
RewriteRule ^mark-forumid([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 ^forumid-([0-9]*).html viewforum.php?f=$1 [L,NC]
RewriteRule ^forumid-([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]
includes/page_header.php
Code:
// Start able2know
if ( !$userdata['session_logged_in'] )
{
ob_start();
function replace_for_mod_rewrite(&$s)
{
$urlin =
array(
"'(?<!/)index.php\?c=([0-9]*)'",
"'(?<!/)index.php'",
"'(?<!/)viewonline.php*'",
"'(?<!/)profile.php*'",
"'(?<!/)search.php*'",
"'(?<!/)login.php*'",
"'(?<!/)faq.php*'",
"'(?<!/)memberlist.php*'",
"'(?<!/)groupcp.php*'",
"'(?<!/)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(
"http://www.host.com/account/forum-\\1.html",
"http://www.host.com/account/forums.html",
"http://www.host.com/account/viewonline.php",
"http://www.host.com/account/profile.php",
"http://www.host.com/account/search.php",
"http://www.host.com/account/login.php",
"http://www.host.com/account/faq.php",
"http://www.host.com/account/memberlist.php",
"http://www.host.com/account/groupcp.php",
"http://www.host.com/account/topic-\\1-\\2-\\3.html",
"http://www.host.com/account/mark-forumid\\1.html",
"http://www.host.com/account/updates-topic\\1.html",
"http://www.host.com/account/stop-updates-topic\\1.html",
"http://www.host.com/account/topicid\\1.html&highlight=\\2",
"http://www.host.com/account/forumid-\\1.html",
"http://www.host.com/account/ptopic\\1.html",
"http://www.host.com/account/ntopic\\1.html",
"http://www.host.com/account/view-poll\\1-\\2-\\3.html",
"http://www.host.com/account/topicid\\1-\\2-\\3-\\4.html",
"http://www.host.com/account/topicid\\1.html",
"http://www.host.com/account/topicid\\1-\\2.html",
"http://www.host.com/account/topicid\\1.html",
"http://www.host.com/account/post-\\1.html",
"http://www.host.com/account/post-\\1.html",
);
$s = preg_replace($urlin, $urlout, $s);
return $s;
}
}
// end able2know
DetectiveForums wrote:
I have had this mod installed for awhile and found that it works great. However one problem is that Google is indexing alot of these pages:
search.php?search_author=username
I have found this on mine too. They should not do it, if it's in the robots.txt, but maybe adjusting the code to turn search.php into search.html might help? I might try that my self and see what happens.