9
   

phpBB Search Engine Optimization - Sessions, static ( SEO )

 
 
FoulFoot
 
  1  
Fri 7 Jul, 2006 01:58 am
Because there was some recent discussion on EasyMOD compatibility, and because I noticed that my index.php was not performing the way it should be, I decided to re-write the index.php portion of this mod's install text. The version below is not only EasyMOD compatible, but it makes index.php into what the author(s) intended -- i.e., removes pagerank-draining distractions from searchbots.

Code:#
#-----[ OPEN ]------------------------------------------
#
index.php

#
#-----[ FIND ]------------------------------------------
#
$forum_moderators[$row['forum_id']][] = '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id']) . '">' . $row['username'] . '</a>';

#
#-----[ REPLACE WITH ]------------------------------------
#
$forum_moderators[$row['forum_id']][] = $row['username'];

#
#-----[ FIND ]------------------------------------------
#
$last_post = $last_post_time . '<br />';

#
#-----[ REPLACE WITH ]------------------------------------
#
$last_post = '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '" title="' . $lang['View_latest_post'] . '">' . $last_post_time . '</a>' . '<br />';

#
#-----[ FIND ]------------------------------------------
#
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $forum_data[$j]['user_id']) . '">' . $forum_data[$j]['username'] . '</a> ';

#
#-----[ REPLACE WITH ]------------------------------------
#
$last_post .= ( $forum_data[$j]['user_id'] == ANONYMOUS ) ? ( ($forum_data[$j]['post_username'] != '' ) ? $forum_data[$j]['post_username'] . ' ' : $lang['Guest'] . ' ' ) : $forum_data[$j]['username'];

#
#-----[ FIND ]------------------------------------------
#
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';

#
#-----[ REPLACE WITH ]------------------------------------
#
/*
$last_post .= '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $forum_data[$j]['forum_last_post_id']) . '#' . $forum_data[$j]['forum_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" /></a>';
*/

Again, this is only for index.php. The rest of the install text still needs some work to achieve EasyMOD compatibility.

Foul
0 Replies
 
FoulFoot
 
  1  
Fri 7 Jul, 2006 02:11 am
Robots.txt is a file that tells search engines what NOT to crawl on your site. Ideally, you want to screen out everywhere that a search engine has no business indexing -- like your userlist, or user's profiles.

To make a robots.txt file, just create a blank text file with the name "robots.txt". Upload this file into your root directory. Search engines will automatically see it and (supposedly) follow it.

This is the contents of mine:

Code:User-agent: Googlebot
User-agent: *
Disallow: /*?
Disallow: /forum/admin/
Disallow: /forum/db/
Disallow: /forum/files/
Disallow: /forum/images/
Disallow: /forum/includes/
Disallow: /forum/language/
Disallow: /forum/spelling/
Disallow: /forum/templates/
Disallow: /forum/common.php
Disallow: /forum/config.php
Disallow: /forum/faq.php
Disallow: /forum/glance_config.php
Disallow: /forum/groupcp.php
Disallow: /forum/login.php
Disallow: /forum/memberlist.php
Disallow: /forum/mini_cal.php
Disallow: /forum/modcp.php
Disallow: /forum/posting,
Disallow: /forum/posting.php
Disallow: /forum/printview.php
Disallow: /forum/privmsg,
Disallow: /forum/privmsg.php
Disallow: /forum/profile.php
Disallow: /forum/search.php
Disallow: /forum/viewforum,
Disallow: /forum/viewforum.php
Disallow: /forum/viewonline.php
Disallow: /forum/viewtopic,
Disallow: /forum/viewtopic.php
Disallow: /forum/updates-topic.html*
Disallow: /forum/stop-updates-topic.html*
Disallow: /forum/ptopic
Disallow: /forum/ntopic
Disallow: /forum/mark
Disallow: /forum/post-

Replace "forum" with whatever the name of your phpBB2 directory is (I believe the default name is "phpBB2").

The first disallow, "Disallow: /*?", keeps search engines from crawling ANY dynamic URLs (any URL that includes a question mark). Do NOT use this line UNLESS you have mod-rewrite installed.

Many of these lines will not work in all search engines. I threw a ton of stuff in there, in the hopes that at least one of the lines will filter out what I want filtered out.

Foul
0 Replies
 
steve gts
 
  1  
Fri 7 Jul, 2006 09:32 am
Hi FF,

Thanks for that, I have now ammended the index file and the site still all seems to be working OK. I assume this is for the SEO 2 MOD as the Static URL's one does not require any modifications to index.php. I just reverted to the file backed up before I added it and ammended it with your code instead, I assume that's the right way to do it?

With regard to Static URL's MOD, I will add the robots.txt as you suggest, but you mentioned "mod rewrite" is this another MOD? if so I don't have it (I would know as I've done the work myself)

So bacically am I right in saying that static URL's can be added with easy mod as I've already ammended the .htaccess and will add the robots.txt

Thanks for your help, it's very much appreciated

Steve
0 Replies
 
FoulFoot
 
  1  
Sat 8 Jul, 2006 12:50 am
steve_gts wrote:
I just reverted to the file backed up before I added it and ammended it with your code instead, I assume that's the right way to do it?

Yep, you got it.

steve_gts wrote:
With regard to Static URL's MOD, I will add the robots.txt as you suggest, but you mentioned "mod rewrite" is this another MOD? if so I don't have it (I would know as I've done the work myself)

It's the Static URLs mod. It's commonly called "mod-rewrite" because that's the critical core of it.

Foul
0 Replies
 
Leone
 
  1  
Sun 16 Jul, 2006 06:31 am
Session ID removal phpBB - Is this possibly?
Session ID removal phpBB - Is this possibly?


I have only seen this session ID removal mod,
I found it on phpbbhacks site but the thing is that
whit this mod no guests can make a post.

But couldent it be made so when someone click on "post message"
then you come to some kind of session ID (Just to be able to make the post)
When the post is made you get back to the normal static html again..

Is this possibly ?

Because i would want to remove the session ID's for a static HTML url
But i also want guests to be able to make a post
0 Replies
 
FoulFoot
 
  1  
Sun 16 Jul, 2006 07:07 pm
Guests can still post with this mod. You may have installed it wrong.

Foul
0 Replies
 
Craven de Kere
 
  1  
Sun 16 Jul, 2006 07:12 pm
FoulFoot wrote:
Guests can still post with this mod.


At least, if they accept cookies.
0 Replies
 
Leone
 
  1  
Mon 17 Jul, 2006 12:43 pm
Huh ?
But i readed on the first page:

Quote:
NOTE: This means you can't enable guest posting to your forums. It won't hamper guests in any way other than disallowing them to post. phpBB recently improved security with their session IDs so this code strikes a perfect balance between session ID integrity and search engine spidering.


"This means you can't enable guest posting"

Or did i missunderstand that ?
0 Replies
 
Craven de Kere
 
  1  
Mon 17 Jul, 2006 05:30 pm
If guests don't accept cookies they may have problems posting, since they won't have a session id in the query string.

For that reason guest posting does not work flawlessly with this mod, but it does work to some degree.
0 Replies
 
Leone
 
  1  
Tue 18 Jul, 2006 03:07 am
Aha, ok..

Well another thing that is on my mind whit this mod.

It seems like it dosen't work to good sometimes,
like when i clicked on the link to this topic i got:
Support: http://www.able2know.com/forums/about15132.html

Quote:

phpBB : Critical Error

Error creating new session

DEBUG MODE

INSERT INTO phpbb_sessions (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in, session_admin) VALUES ('1f7f7f406e08ce75dd50e1ed4ea9684c', -1, 1153213189, 1153213189, 'd4b50864', 36, 0, 0)

Line : 213
File : sessions.php


Refreshed the page and it worked, i also got problem if i have
your page open for some houers and then try to open another
page on this page, then it also be some problems like
"not finding bla bla error" message, refresh and it works
Is that something you know about ?
0 Replies
 
Leone
 
  1  
Tue 18 Jul, 2006 08:40 am
Btw, while im at it..

Can i choose to only install this mod
(phpBB static URLs mod_rewrite 1.0.0)

Is that the latest of the static html mod ?

Because when i reading in the file version 2:
"Able2Know.com Search Engine Optimization 2.0.0"
There seems to be some other things then the static html.


So i wonder:
Can i only install "URLs mod_rewrite 1.0.0"
And is that the latest ? (For that part)

And also

Why should it be dissalowed in the
robots.txt

Disallow: forums/post-*.html$
Disallow: forums/updates-topic.html*$
Disallow: forums/stop-updates-topic.html*$
Disallow: forums/ptopic*.html$
Disallow: forums/ntopic*.html$
?
Isen't that the posts that get dissalowed then ?

Sorry if it is stupid questions that i ask.. =P
0 Replies
 
howardm4
 
  1  
Tue 18 Jul, 2006 10:44 am
I'm a bit unsure of the meaning of the following regex..........

"'(?<!/)viewforum.php\?f=([0-9]*)&topicdays=([0-9]*)&start=([0-9]*)'",

and the others.

The first (?<!/) is what is confusing. In regex parlance, it's looking for
the sequence and grouping them for a backreference but that can't be
since the $urlout uses only the other 3 groupings.

What exactly is that doing?

Thanks.
0 Replies
 
Leone
 
  1  
Wed 19 Jul, 2006 10:43 am
Leone wrote:

Why should it be dissalowed in the
robots.txt

Disallow: forums/post-*.html$
Disallow: forums/updates-topic.html*$
Disallow: forums/stop-updates-topic.html*$
Disallow: forums/ptopic*.html$
Disallow: forums/ntopic*.html$
?
Isen't that the posts that get dissalowed then ?

Sorry if it is stupid questions that i ask.. =P


Should it not be something like:
Disallow: viewtopic.php*

Instead ?
(To eliminate duplicate copies for google)
0 Replies
 
Leone
 
  1  
Thu 20 Jul, 2006 07:49 am
Leone wrote:
Leone wrote:

Why should it be dissalowed in the
robots.txt

Disallow: forums/post-*.html$
Disallow: forums/updates-topic.html*$
Disallow: forums/stop-updates-topic.html*$
Disallow: forums/ptopic*.html$
Disallow: forums/ntopic*.html$
?
Isen't that the posts that get dissalowed then ?

Sorry if it is stupid questions that i ask.. =P


Should it not be something like:
Disallow: viewtopic.php*

Instead ?
(To eliminate duplicate copies for google)


Soo ?
Shoulden't viewtopic.php be dissalowed to remove duplicate contents ?

And another question, should it not be:
Disallow: post-*.html$
Disallow: updates-topic.html*$
Disallow: stop-updates-topic.html*$
Disallow: ptopic*.html$
Disallow: ntopic*.html$

("forums/" removed)
0 Replies
 
legalit
 
  1  
Mon 24 Jul, 2006 05:58 am
Hi there.
I'd like to only implement these items from the mod please:

Quote:
## 2) Make the date of the last post link to the last post like the icon did on index.php (Craven de Kere)
## 3) Unlink the username of the last post on index.php (Craven de Kere)
## 6) Unlink the username of the last post on viewforum.php (Craven de Kere)
## 8) Make the date of the last post link to the last post like the icon did on viewforum.php (Craven de Kere)
## 9) Unlink the author username on viewforum.php (Craven de Kere)
## 10) Remove signatures for guest views (Craven de Kere)
## 11) Remove avatars for guest views (Craven de Kere)
## 12) Remove personal info (Profile, IM, PM, AIM, etc) for guest views (darbyrob)
## 13) Unlink the username of the last post on search.php (Craven de Kere)
## 15) Make the date of the last post link to the last post like the icon did on search.php (Craven de Kere)
## 16) Unlink the author username on search.php (Craven de Kere)
## 17) Link the user post count to a search of the user's posts (Craven de Kere)
## 18) Make Auth list on viewtopic.php invisible to search engines (Craven de Kere)
## 19) Make the previous and next topic links invisible to search engines (Craven de Kere)
## 22) Hide forum stats from guests and spiders (Craven de Kere)


Thanks very much for your help.
Very Happy
0 Replies
 
treelovinhippie
 
  1  
Sun 30 Jul, 2006 02:37 am
Has someone got the files somewhere so I can just drag-drop and overwrite the existing files?

I started out trying to manually search and replace the code, but ended up missing bits and it ended up a mess lol.

I'm using the latest version of phpbb and the Play template.

cheers
nathan
0 Replies
 
steffun00
 
  1  
Sun 30 Jul, 2006 05:17 am
I have a problem with my forum. I installed the mods but the .htaccess doesn't work. I think it's because of my windows hosting. What should I do?
0 Replies
 
montanadaver
 
  1  
Mon 31 Jul, 2006 09:55 pm
Bots still pulling URLs with SIDs after SEO Hack
The SEO hack works great! However, is it normal for the apache access_log to show bots pulling files like this?:

66.249.65.7 - - [31/Jul/2006:20:30:43 -0500] "GET /viewforum.php?f=12&sid=7b809a08f6bc594fcd36ac10b6382d46 HTTP/1.1" 200 21713
66.249.65.7 - - [31/Jul/2006:20:32:16 -0500] "GET /viewforum.php?f=10&sid=7b809a08f6bc594fcd36ac10b6382d46 HTTP/1.1" 200 20969
66.249.65.7 - - [31/Jul/2006:21:07:20 -0500] "GET /viewforum.php?f=16&sid=7b809a08f6bc594fcd36ac10b6382d46 HTTP/1.1" 200 21058
66.249.65.7 - - [31/Jul/2006:21:17:14 -0500] "GET /viewforum.php?f=8&sid=7b809a08f6bc594fcd36ac10b6382d46 HTTP/1.1" 200 21734
0 Replies
 
mark2gli
 
  1  
Wed 2 Aug, 2006 08:29 am
I am getting a 404 error when guests try to access any forum.... please help
0 Replies
 
montanadaver
 
  1  
Wed 2 Aug, 2006 09:03 am
mark2gli wrote:
I am getting a 404 error when guests try to access any forum.... please help


The easiest thing to do is put back the original un-hacked files one-at-a-time until you find the file(s) that don't work. Then look thru those files and find your error. It is extremely difficult to change these files without making some kind of mistake. When I applied the hack I had about 3 different errors that I had to find and fix. I used the technique described above and had everything working in about 15 minutes. If this technique isn't successful we will need more information in order to diagnose and fix this problem. Unfortunately, there are many reasons why you could be seeing this error and I don't know of anyone except Craven who might be able to guess the right answer without more info.
0 Replies
 
 

Related Topics

SEO - Going from 0 PR on up - Discussion by jespah
How Rich Pins work ??? - Question by OnceUponAtime
Need a bit of Google advice - Question by bible quizzer
Google Indexing Issue - Question by brainstudioz
Bing Search results - Discussion by iankyra
What is best way for Off-Page seo in 2017? - Question by honesttravel1
 
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.11 seconds on 11/22/2024 at 02:40:02