| |
|
| :: |
| Author |
Message |
PerfRen
Joined: 01 Nov 2007 Posts: 36
|
Posted: Thu Nov 01, 2007 4:33 pm Post subject: 404 Errors for every page |
|
|
Hi All,
Now have been spending time optimising my forum and site using hints and tips from here and other SEO sites.
I decided to take the plunge and install the Advanced Mod Rewrite mod and the coding update worked well - have been modding phpBB boards for years successfully.
I backed up all my files and uploaded the new ones and the new folder inc. files and then modded my .htaccess file to be as follows:
| Code: | <Files 403.shtml>
order allow,deny
allow from all
</Files>
<Files .phpbbsecurity>
deny from all
</Files>
deny from 64.159.74.250
deny from 64.159.74.241
deny from 69.94.85.88
deny from 166.70.17.187
deny from 128.121.135.1
deny from 216.200.145.34
deny from 66.225.255.107
deny from 217.68.109.83
deny from 212.78.212.200
deny from 217.154.245.13
deny from 222.51.98.239
deny from 64.202.166.212
deny from 216.239.51.85
deny from 192.67.198.3
deny from 66.246.254.122
deny from 38.113.244.30
deny from 72.35.74.241
deny from 66.254.100.28
deny from 208.254.3.166
deny from 207.198.77.108
deny from 80.231.169.122
deny from 195.26.153.131
deny from 194.145.63.12
deny from 66.225.199.210
deny from 212.187.158.5
deny from 205.209.157.240
deny from 67.18.224.138
deny from 64.94.162.225
deny from 212.116.150.153
deny from 205.209.157.241
deny from 216.152.252.53
deny from 72.36.223.106
deny from 205.234.186.66
deny from 195.24.39.97
deny from 66.98.166.78
# You could need to un-comment the following line
# Options +FollowSymlinks
RewriteEngine On
RewriteBase /
#########################################################
# PHPBB SEO REWRITE RULES #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# FORUM INDEX (un-comment if used)
RewriteRule ^phpbb/index\.html$ /forum/index.php [QSA,L,NC]
# FORUM PORTAL (un-comment if used)
RewriteRule ^phpbb/portal\.html$ /forum/portal.php [QSA,L,NC]
# FORUM PROTECTION RULE
# RewriteRule ^phpbb/[a-z0-9_-]*/([^/]+\.html)$ /forum/index.php [R=301,L,NC]
# CATEGORIES
RewriteRule ^phpbb/[a-z0-9_-]*-c([0-9]+)\.html$ /forum/index.php?c=$1 [QSA,L,NC]
# PAGINATED FORUM
RewriteRule ^phpbb/[a-z0-9_-]*-f([0-9]+)-([0-9]+)\.html$ /forum/viewforum.php?f=$1&start=$2 [QSA,L,NC]
# FORUM
RewriteRule ^phpbb/[a-z0-9_-]*-f([0-9]+)\.html$ /forum/viewforum.php?f=$1 [QSA,L,NC]
# PAGINATED TOPIC
RewriteRule ^phpbb/[a-z0-9_-]*-t([0-9]+)-([0-9]+)\.html$ /forum/viewtopic.php?t=$1&start=$2 [QSA,L,NC]
# TOPIC
RewriteRule ^phpbb/[a-z0-9_-]*-t([0-9]+)\.html$ /forum/viewtopic.php?t=$1 [QSA,L,NC]
# POST
RewriteRule ^phpbb/post([0-9]+)\.html$ /forum/viewtopic.php?p=$1 [QSA,L,NC]
#PROFILES
RewriteRule ^phpbb/member([0-9]+)\.html$ /forum/profile.php?mode=viewprofile&u=$1 [QSA,L,NC]
# END PHPBB PAGES
#####################################################
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://performancerenaults.co.uk/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://performancerenaults.co.uk$ [NC]
RewriteCond %{HTTP_REFERER} !^http://performancerenaults.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^http://performancerenaults.com$ [NC]
RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ http://www.performancerenaults.com/forum/portal.php [R,NC]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^forum/membership.php$ http://www.performancerenaults.com [R=302,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^forum/addentry.php$ http://www.performancerenaults.com [R=302,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^forum/contact_form.php$ http://www.performancerenaults.com [R=302,L]
RewriteCond %{HTTP_HOST} ^.*$
RewriteRule ^viewforum.php$ http://www.performancerenaults.com [R=302,L]
|
And then uploaded it to the server root.
Now I do have ezportal on my board and wasn't so worried about getting the portal.php converting to portal.html and still being the front page controlled by a secondary .htaccess file in the forum root...
(Current secondary .htaccess file in forum root to make portal.php the default page)
| Code: |
DirectoryIndex index.html index.htm portal.php index.php
RewriteEngine on
RewriteRule ^webpage/([^/\.]+)/?$ webpage_view.php?webpage=$1 [L]
|
So I deleted the secondary .htaccess file for the time being.
I ran the rewrite test first - the find / found one and all was good.
The I went to my site and lo and behold the pages were coming up with html extensions however none of them were showing
I kept getting 404 errors:
| Code: |
[Thu Nov 01 08:21:35 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/index.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:20:17 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/index.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:20:09 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/general-banter-f1.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:20:04 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/index.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:15:31 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/general-banter-f1.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:15:24 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/index.html
[Thu Nov 01 08:15:20 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/index.html
[Thu Nov 01 08:15:17 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/index.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:13:56 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/general-banter-f1.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:13:48 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/general-banter-f1.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:12:25 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/ebay-listings-f33.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:12:04 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/newbies-f24.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:10:15 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/newbies-f24.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:10:08 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/general-banter-f1.html, referer: http://www.performancerenaults.com/forum/
[Thu Nov 01 08:08:46 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/post31834.html, referer: http://www.performancerenaults.com/forum/portal.php
[Thu Nov 01 08:08:13 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/index.html, referer: http://www.performancerenaults.com/forum/portal.php?sid=a4665fe69ea2d2691ae7c358b15926f8
[Thu Nov 01 08:07:31 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/post31832.html, referer: http://www.performancerenaults.com/forum/portal.php
[Thu Nov 01 08:07:11 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/post31834.html, referer: http://www.performancerenaults.com/forum/portal.php
[Thu Nov 01 08:06:55 2007] [error] [client xx.xx.xxx.xx] File does not exist: /home/laguna/public_html/forum/index.html, referer: http://www.performancerenaults.com/forum/portal.php
|
Now i did second test of removing the "/" before the word "forum" and uploaded a new .htaccess file to no avail.
It looks like it wants to work but I miust be missing something.
Can anyone point me in the right direction and then also help me make my portal.html (orig portal.php) the default file in the forum folder once again
As of now it has been restored to its previous state of 2 .htaccess files that have run in harmony for 3 years and the AMR code removed.
Thanks for any help given.
Great site btw!
Performance Renaults Club |
|
|
| Back to top |
|
 |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3477
|
Posted: Thu Nov 01, 2007 6:11 pm Post subject: Re: 404 Errors for every page |
|
|
Looks like you need to put the correct path on both sides of the rewriterules :
| Code: | # CATEGORIES
RewriteRule ^phpbb/[a-z0-9_-]*-c([0-9]+)\.html$ /forum/index.php?c=$1 [QSA,L,NC] |
Should be :
| Code: |
# CATEGORIES
RewriteRule ^forum/[a-z0-9_-]*-c([0-9]+)\.html$ /forum/index.php?c=$1 [QSA,L,NC] |
and so on for all the rewriterules.
The .htaccess should be located at the domain's root as is, and should work.
The .htacess in the forum/ folder will most likely cause trouble though. At first, try using :
| Code: | | RewriteRule ^forum/webpage/([^/\.]+)/?$ /forum/webpage_view.php?webpage=$1 [L] |
in the root's .htaccess and deleted the one in the forum folder.
It will work the same.
 |
_________________ phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible ! |
|
| Back to top |
|
 |
PerfRen
Joined: 01 Nov 2007 Posts: 36
|
Posted: Thu Nov 01, 2007 7:52 pm Post subject: Re: 404 Errors for every page |
|
|
Thanks a lot for the quick reply - will try it tomorrow by uploading the modded files again and going from there
Such a silly and obvious mistake now you have shown me! Long day interviewing software engineers is my excuse lol.
Now is there anything I need to do the supplied seo php file that gets uploaded to the site for making my portal.php the first page again or in the new .htaccess file? I read that you had to do something in the php file for the Index page?
In todays world for example if I type http://www.performancerenaults.com/forum/ it goes to http://www.performancerenaults.com/forum/portal.php so would like it to still go to http://www.performancerenaults.com/forum/portal.html first
Many thanks again for the help so far and also for any help in advance.
 |
|
|
| Back to top |
|
 |
PerfRen
Joined: 01 Nov 2007 Posts: 36
|
Posted: Fri Nov 02, 2007 3:58 pm Post subject: Re: 404 Errors for every page |
|
|
Ok - well all good so far fingers crossed
The site seems to be now using a mixture of HTML and php pages lol.
So whats next for me to do SEO wise with the mods from here?
When will Google et al start listing the new format?
Thanks for all the help so far and for the help in advance.
 |
|
|
| Back to top |
|
 |
PerfRen
Joined: 01 Nov 2007 Posts: 36
|
Posted: Fri Nov 02, 2007 9:19 pm Post subject: Re: 404 Errors for every page |
|
|
Ok been fixing lots of little probs since installing this today...
1) One thing that is worrying is that 3 different URL's can now go to the same post...
http://www.performancerenaults.com/forum/post31905.html#31905
http://www.performancerenaults.com/forum/viewtopic.php?t=3446
http://www.performancerenaults.com/forum/you-have-got-to-be-kidding-t3446.html
Now am I not going to be penalised by Google et al for haveing 3 URL's going to the same post?
2) Also I need some help with making the following code from my portal.php (now portal.html) page use the new "$phpbb_seo->" code...
| Code: |
//
// Recent Topics
//
$sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
}
$forum_data = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[] = $row;
}
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);
if( $CFG['exceptional_forums'] == '' )
{
$except_forum_id = '\'start\'';
}
else
{
$except_forum_id = $CFG['exceptional_forums'];
}
for ($i = 0; $i < count($forum_data); $i++)
{
if ((!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_read']) or (!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']))
{
if ($except_forum_id == '\'start\'')
{
$except_forum_id = $forum_data[$i]['forum_id'];
}
else
{
$except_forum_id .= ',' . $forum_data[$i]['forum_id'];
}
}
}
$sql = "SELECT f.forum_name, f.forum_id, t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, p.post_id, p.poster_id, p.post_time, u.user_id, u.username, u.user_level
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u, " . FORUMS_TABLE . " AS f
WHERE t.forum_id NOT IN (" . $except_forum_id . ")
AND t.topic_status <> 2
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
AND f.forum_id = t.forum_id
ORDER BY p.post_id DESC
LIMIT " . $CFG['number_recent_topics'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);
}
$number_recent_topics = $db->sql_numrows($result);
$recent_topic_row = array();
while ($row = $db->sql_fetchrow($result))
{
$recent_topic_row[] = $row;
}
for ($i = 0; $i < $number_recent_topics; $i++)
{
// Start add - Username Color Mod
switch ( $recent_topic_row[$i]['user_level'] )
{
case ADMIN:
$poster_name = '<strong>' . $recent_topic_row[$i]['username'] . '</strong>';
$style_color = ' style="color: #' . $theme['fontcolor3'] . '"';
break;
case MAIN_MOD:
$poster_name = '<strong>' . $recent_topic_row[$i]['username'] . '</strong>';
$style_color = ' style="color: #' . $theme['fontcolor98'] . '"';
break;
case MOD:
$poster_name = '<strong>' . $recent_topic_row[$i]['username'] . '</strong>';
$style_color = ' style="color: #' . $theme['fontcolor2'] . '"';
break;
case SUPPORT:
$poster_name = '<strong>' . $recent_topic_row[$i]['username'] . '</strong>';
$style_color = ' style="color: #' . $theme['fontcolor4'] . '"';
break;
case CLUB:
$poster_name = '<strong>' . $recent_topic_row[$i]['username'] . '</strong>';
$style_color = ' style="color: #' . $theme['fontcolor5'] . '"';
break;
case BOT:
$poster_name = '<strong>' . $recent_topic_row[$i]['username'] . '</strong>';
$style_color = ' style="color: #' . $theme['fontcolor99'] . '"';
break;
default:
$poster_name = $recent_topic_row[$i]['username'];
$style_color = ' style="color: #006699"';
break;
}
//$poster_name = '[<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']) . '"' . $style_color . '>' . $poster_name . '</a>]';
$poster_name = '[<span' . $style_color . '>' . $poster_name . '</span>]';
// End add - Username Color Mod
$topic_title = $recent_topic_row[$i]['topic_title'];
$topic_title = smilies_pass($topic_title);
$template->assign_block_vars('recent_topic_row', array(
'L_FORUMNAME' => $recent_topic_row[$i]['forum_name'],
'U_FORUMNAME' => append_sid("viewforum.$phpEx?"."f=".$recent_topic_row[$i]['forum_id']),
'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],
//'L_TITLE' => $recent_topic_row[$i]['topic_title'],
'L_TITLE' => $topic_title,
//'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']),
//'S_POSTER' => $recent_topic_row[$i]['username'],
'S_POSTER' => $poster_name,
'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone']
)
)
);
}
//
// END - Recent Topics
//
|
Idealing converting U_FORUMNAME and U_TITLE to the new formats
3) Can someone explain please what is the Dupe Posts mod I keep hearing about? Will this fix my 3 Urls issue?
4) And finally alog with the sitemaps mod, what others should I be adding to go with ARM to improve everything on my site?
Many thanks for all the help to date  |
|
|
| Back to top |
|
 |
SeO Administrateur - Site Admin

Joined: 15 Mar 2006 Posts: 3477
|
Posted: Fri Nov 02, 2007 11:35 pm Post subject: Re: 404 Errors for every page |
|
|
Yes, what you need now is the zero duplicate, will HTTP 301 redirect everything :
http://www.phpbb-seo.com/boards/viewtopic.php?t=678
http://www.phpbb-seo.com/boards/zero-duplicate/is-this-a-duplicate-vt678.html
http://www.phpbb-seo.com/boards/viewtopic.php?p=5382
etc ...
Then, since it looks like your site previously was indexed (I assume you where not using url rewriting before), you should wait a month before you install the suggested robots.txt, to let the regular url be redirected before you disallow them.
This way, you should keep your SERP during the migration. After it will still be useful for advanced pagination links and the other un rewritten links. As you have noticed, the mod does not rewrite all links, only the content links are rewritten, because more would be useless, if not counter productive.
For the portal rewriting, find :
| Code: | | $recent_topic_row[] = $row; |
after add :
| Code: | // www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ( !isset($phpbb_seo->seo_url['forum'][$recent_topic_row['forum_id']]) ) {
$phpbb_seo->seo_url['forum'][$recent_topic_row['forum_id']] = $phpbb_seo->format_url($recent_topic_row['forum_name'], $phpbb_seo->seo_static['forum']);
}
// www.phpBB-SEO.com SEO TOOLKIT END |
Will do the trick for forum URL, other are post urls and already rewritten.
 |
_________________ phpBB SEO || SEO Forum || Forum Référencement
GYM Sitemap & RSS for phpBB3 has been released ! || GYM Sitemap & RSS for phpBB3 est disponible ! |
|
| Back to top |
|
 |
PerfRen
Joined: 01 Nov 2007 Posts: 36
|
Posted: Sat Nov 03, 2007 4:35 pm Post subject: Re: 404 Errors for every page |
|
|
Thanks again for the help
I have tried the code above thank you but it hasnt changed anything for me on my portal page.
My portal.tpl references {recent_topic_row.U_FORUMNAME} and {recent_topic_row.U_TITLE} for the Recent posts and has not been updated to the new format with that change you suggested for my portal.php file. Is there something else I need to do?
I will also try the Zero Dupes mod after - is there a right order to installing the mods?
Should I do the Zero Dupes one before the Sitemap one for example?
Also in the last 24/48 hours I seem to have disappeared from Google when typing: "Performance Renaults" in it - was #1 and now I'm no where - could this change and mod have caused this? Do I need to wait for it to be re-spidered?
Many thanks. |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14279
|
Posted: Sat Nov 03, 2007 6:16 pm Post subject: Re: 404 Errors for every page |
|
|
You really need to install the zero duplicate, since your forum previously was indexed. The sooner the better. As well, you should delete the robots.txt if you added the suggested one, just for a month or two, before you'll put it back on.
What you want right now, is your old url to be properly redirected to the new one, eg the zero duplicate.
About the portal, please post a new topic in this forum mentioning the portal download link if any (in order to be helpful to others).
++ |
_________________ Useful links :
SEO Forum || SEO Directory || SEO phpBB || SEO phpBB3 || Search
____________________
Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Référencement phpBB3 || Recherche |
|
| Back to top |
|
 |
PerfRen
Joined: 01 Nov 2007 Posts: 36
|
Posted: Sat Nov 03, 2007 6:32 pm Post subject: Re: 404 Errors for every page |
|
|
Thanks for the reply
Have added the Zero Dupes Mod successfully now and the mx Sitemaps Mod too.
I will create a new post as you asked for the Portal query.
The robots.txt file you mention - the "suggested one" - where do i find this to see if it is different to the one I have currently in place?
Should I also delete my current robots.txt file anyway?
Many thanks for the great code  |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14279
|
|
| Back to top |
|
 |
PerfRen
Joined: 01 Nov 2007 Posts: 36
|
Posted: Thu Nov 08, 2007 3:07 pm Post subject: Re: 404 Errors for every page |
|
|
Thanks for the pointer
The help here is excellent!
So would robots.txt consist solely of:
======================
User-agent: *
Disallow: /forum/viewtopic.php
Disallow: /forum/viewforum.php
Disallow: /forum/index.php?
Disallow: /forum/posting.php
Disallow: /forum/groupcp.php
Disallow: /forum/search.php
Disallow: /forum/login.php
Disallow: /forum/privmsg.php
Disallow: /forum/post
Disallow: /forum/member
Disallow: /forum/profile.php
Disallow: /forum/memberlist.php
Disallow: /forum/faq.php
======================
Many thanks. |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 14279
|
|
| Back to top |
|
 |
PerfRen
Joined: 01 Nov 2007 Posts: 36
|
Posted: Sat Nov 10, 2007 12:34 pm Post subject: Re: 404 Errors for every page |
|
|
Thanks for the help
Have taken those 3 lines out of my file and will put them back in in a month or so.
Cheers! |
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|