phpBB and sessions ID, Search Engine optimization technique

by Ricky on January 06, 2004, 11:32:19 AM
Pages: 1 [2]  All
Print
Author  (Read 21294 times)
cdr740
Guest
«Reply #15 on: March 17, 2004, 08:35:12 PM »
Hi Ricky,

Thanks for your help :D

I just uploaded the new sessions.php from the link http://www.yoindia.com/forums/viewtopic.php?p=189 which is the pre-modded version which is a lot easier for me and also has the MOD #2 which you recommend.

I have also set meta tags for the robots as index, follow.

My website has also already undergone SEO a few weeks back :D

I believe this is everything I now need to help my forum show up in the search engines...If I am missing something, please let me know.

Also I have created a robots.txt and put this in the /forum folder with the rest of the forum files...Is this the correct place for the robots.txt file?

Thanks for your help
Dan
Logged
Similar Poetry and Posts (Note: Find replies to above post after the related posts and poetry)
Have to login twice in phpBB ... Help!! by gmages in Technology & Computers
Modified or moded phpBB sessions.php with SID removal MOD by Ricky in Technology & Computers
Most used search engine is here by Ricky in Technology & Computers « 1 2  All »
JellllloMOOOKollllll
Guest
«Reply #16 on: March 28, 2004, 02:34:09 AM »
Hello Every one ..

OK This is nice mod .. but i get some problem when i try to add this mod.
Here  i try to add this  mod .  but i get some    problem   with  this code  when i add   it   .. and i go to check the forums  i cant .. it;s  give me the page cant  found  ..when i remove it ..  its working so  do u  have any  idea  how  can i  fix this problem

This is the Code Iam Talking About?Huh??
Code:
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'",
"'(?<!/)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]*)&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(
"viewforum\\1-\\2-\\3.html",
"forum\\1.html",
"forum\\1.html",
"ptopic\\1.html",
"ntopic\\1.html",
"ftopic\\1-\\2-\\3-\\4.html",
"ftopic\\1.html",
"ftopic\\1-\\2.html",
"ftopic\\1.html",
"sutra\\1.html",
"sutra\\1.html",
);
$s = preg_replace($urlin, $urlout, $s);
return $s;
}

Pls  If u have any Idea  Let Me know

Thankyou :wink:
Logged
Ricky
Yoindian Shayar
******

Rau: 8
Offline Offline

Gender: Male
Waqt Bitaya:
4 days, 3 hours and 56 minutes.

Posts: 2455
Member Since: Dec 2003


View Profile
«Reply #17 on: March 28, 2004, 05:22:03 AM »
Do u know your mod_rewrite is enabled on your servers ?
Logged
beggers
Guest
«Reply #18 on: April 10, 2004, 06:29:21 PM »
Quote from: "JellllloMOOOKollllll"
Hello Every one ..

OK This is nice mod .. but i get some problem when i try to add this mod.
Here  i try to add this  mod .  but i get some    problem   with  this code  when i add   it   .. and i go to check the forums  i cant .. it;s  give me the page cant  found  ..when i remove it ..  its working so  do u  have any  idea  how  can i  fix this problem

This is the Code Iam Talking About?Huh??
Code:
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'",
"'(?<!/)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]*)&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(
"viewforum\\1-\\2-\\3.html",
"forum\\1.html",
"forum\\1.html",
"ptopic\\1.html",
"ntopic\\1.html",
"ftopic\\1-\\2-\\3-\\4.html",
"ftopic\\1.html",
"ftopic\\1-\\2.html",
"ftopic\\1.html",
"sutra\\1.html",
"sutra\\1.html",
);
$s = preg_replace($urlin, $urlout, $s);
return $s;
}

Pls  If u have any Idea  Let Me know

Thankyou :wink:


I just had the same problem and finally got it working.  This version of code for the page header was posted by someone else, and it works for me:

Code:
ob_start(); 

function replace_for_mod_rewrite(&$s) {
// get the correct base_url: protocoll,url,path to make sure to rewrite only internal links
if (empty($HTTP_SERVER_VARS['HTTP_HOST'])) {
   $server = getenv('HTTP_HOST');
} else {
   $server = $HTTP_SERVER_VARS['HTTP_HOST'];
}
// IIS sets HTTPS=off
if (isset($HTTP_SERVER_VARS['HTTPS']) && $HTTP_SERVER_VARS['HTTPS'] != 'off') {
   $proto = 'https://';
} else {
   $proto = 'http://';
}
// Get the name of this URI
// Start of with REQUEST_URI
if (isset($HTTP_SERVER_VARS['REQUEST_URI'])) {
   $path = $HTTP_SERVER_VARS['REQUEST_URI'];
} else {
   $path = getenv('REQUEST_URI');
}
if ((empty($path)) || (substr($path, -1, 1) == '/')) {
   // REQUEST_URI was empty or pointed to a path
   // Try looking at PATH_INFO
   $path = getenv('PATH_INFO');
   if (empty($path)) {
      // No luck there either
      // Try SCRIPT_NAME
      if (isset($HTTP_SERVER_VARS['SCRIPT_NAME'])) {
         $path = $HTTP_SERVER_VARS['SCRIPT_NAME'];
      } else {
         $path = getenv('SCRIPT_NAME');
      }
   }
}

$path = preg_replace('/[#\?].*/', '', $path);
$path = dirname($path);

if (preg_match('!^[/\\\]*$!', $path)) {
   $path = '';
}

$base_url = "$proto$server$path/";
$prefix = '|"(?:'.$base_url.')?';
// now that we know about the correct $prefix we can start the rewriting

$urlin =
array(
$prefix . '(?<!/)index.php"|',
$prefix . '(?<!/)viewforum.php\?f=([0-9]*)&(?:amp;)topicdays=([0-9]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewforum.php\?f=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)view=previous"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)view=next"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)postdays=([0-9]*)&(?:amp;)postorder=([a-zA-Z]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)start=([0-9]*)&(?:amp;)postdays=([0-9]*)&(?:amp;)postorder=([a-zA-Z]*)&(?:amp;)highlight=([a-zA-Z0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)&(?:amp;)start=([0-9]*)"|',
$prefix . '(?<!/)viewtopic.php\?t=([0-9]*)"|',
);
$urlout = array(
'"forums.html"',
'"viewforum\\1-\\2-\\3.html"',
'"forum\\1.html"',
'"ptopic\\1.html"',
'"ntopic\\1.html"',
'"ftopic\\1-\\2-\\3-\\4.html"',
'"ftopic\\1.html"',
'"ftopic\\1-\\2.html"',
'"ftopic\\1.html"',
);

$s = preg_replace($urlin, $urlout, $s);
return $s;
}


Also, I used the premodded sessions.php that is previously mentioned in this topic.

Finally, the .htaccess code doesn't go into your site root.  It should be a seperate .htaccess in your FORUM root.  In my case, that file only contains this code, nothing else:

Code:
RewriteEngine On 
RewriteRule ^forums.*$ index.php  
RewriteRule ^forum([0-9]*).*$ viewforum.php?f=$1&mark=topic  
RewriteRule ^viewforum([0-9]*)-([0-9]*)-([0-9]*).*$ viewforum.php?f=$1&topicdays=$2&start=$3
RewriteRule ^forum([0-9]*).*$ viewforum.php?f=$1
RewriteRule ^ptopic([0-9]*).*$ viewtopic.php?t=$1&view=previous
RewriteRule ^ntopic([0-9]*).*$ viewtopic.php?t=$1&view=next
RewriteRule ^ftopic([0-9]*)-([0-9]*)-([a-zA-Z]*)-([0-9]*).*$ viewtopic.php?t=$1&postdays=$2&postorder=$3&start=$4
RewriteRule ^ftopic([0-9]*)-([0-9]*).*$ viewtopic.php?t=$1&start=$2
RewriteRule ^ftopic([0-9]*).*$ viewtopic.php?t=$1
RewriteRule ^ftopic([0-9]*).html$ viewtopic.php?t=$1&start=$2&postdays=$3&postorder=$4&highlight=$5
RewriteRule ^sutra([0-9]*).*$ viewtopic.php?p=$1


On the other hand, the changes to the robots.txt file should be added to the robots.txt file in your SITE root.

It took me a few hours to get all this working on one of my smaller phpBB sites.  Now I guess I'll try it on the largest site (which has a lot more mods  :? )
Logged
Anonymous
Guest
«Reply #19 on: April 13, 2004, 07:29:25 AM »
I just had a user of my forums (http://kiwirant.com) report a problem - the next link for forums and threads doesn't work, and neither do the direct page jump links (1, 2, 3, next).

Check it out on these pages: Forum, topic.

The parameters after the .html are being passed, but for some reason they're not being picked up by scripts. Has anyone one run into this before? If not, would anyone have any ideas about where to start looking for a solution?

I love that google and other engines index my site, but not at the expense of users being able to access the whole site. Thanks for any ideas Usual Smile
Logged
beggers
Guest
«Reply #20 on: April 13, 2004, 08:11:54 AM »
Quote from: "commando"
I just had a user of my forums (http://kiwirant.com) report a problem - the next link for forums and threads doesn't work, and neither do the direct page jump links (1, 2, 3, next).

Check it out on these pages: Forum, topic.

The parameters after the .html are being passed, but for some reason they're not being picked up by scripts. Has anyone one run into this before? If not, would anyone have any ideas about where to start looking for a solution?

I love that google and other engines index my site, but not at the expense of users being able to access the whole site. Thanks for any ideas Usual Smile


The code I posted above incorporates a fix for that problem.  Those features work fine on my site.
Logged
Anonymous
Guest
«Reply #21 on: April 13, 2004, 08:43:18 AM »
Woohoo, it works! Thanks beggers Usual Smile

I just made the change to the page headers file, the .htaccess looks identical to the one I already have. Thanks again Usual Smile
Logged
beggers
Guest
«Reply #22 on: April 13, 2004, 04:16:20 PM »
I really think the mod_write concept is a great idea but I have a few thoughts about it.  Someone mentioned a site where you can simulate how a spider analyzes your site ( http://www.submitexpress.com/analyzer/ ).  I tried entering the URL to my phpBB index.php page and checked out the results.

The mod_rewrite does seem to be working.  Forums and Topics now have .html extensions. However, some of the results of this test concern me.

For example, the spider is going through all the member profiles despite the fact that I have this line in robots.txt:

Code:
Disallow: /phpBB2/profile.php


It's also reporting a ton of links from postings_popup.php (another mod that I tried to disallow). So is the analyzer not obeying robots.txt or do I have the settings wrong?

Also, and I think this may be a greater concern, the spider is finding all the direct links to individual replies, such as:

Code:
......viewtopic.php?p=3866#3866


But these links aren't being converted to .html files. Shouldn't they be, since they lead directly to real content?  And the fact is, these direct links greatly outnumber the individual topic links since every topic can have multiple replies.

Any comments on this would be welcome!
Logged
ifnotthis
Guest
«Reply #23 on: May 10, 2004, 06:34:52 AM »
Hi.. I don't kno wht is the problem . But i had applied mod_rewrite and when I open my site.. it shows that all links are now html but whenever I click any link It says not found !! where is the Mistake ?

I tried orignal mod rewrite and modified head suggested in this thread

sad5
Logged
Ricky
Yoindian Shayar
******

Rau: 8
Offline Offline

Gender: Male
Waqt Bitaya:
4 days, 3 hours and 56 minutes.

Posts: 2455
Member Since: Dec 2003


View Profile
«Reply #24 on: May 12, 2004, 10:50:25 AM »
Well, Here problem is that your apache is not configured to read your .htaccess file. either change allowoverride none to all or ask your host to do changes for u!
Logged
oaf357
Guest
«Reply #25 on: July 18, 2004, 12:08:30 AM »
Is there a "pre-packaged" distribution of a spiderable version of phpBB available to download right now?
Logged
Ricky
Yoindian Shayar
******

Rau: 8
Offline Offline

Gender: Male
Waqt Bitaya:
4 days, 3 hours and 56 minutes.

Posts: 2455
Member Since: Dec 2003


View Profile
«Reply #26 on: July 18, 2004, 06:34:32 AM »
Well... I don't know about spiderable ..  but there are heavily moded phpbb available.. like phpbb.de

Anyway..  to make spiderable the easiest is sid removal mode and that works great ..  if you want you can simply replace your existing sessions.php with the moded one available in this site at Premoded SID removal for phpBB
Logged
saxena
Guest
«Reply #27 on: April 18, 2006, 12:42:44 PM »
You can read interesting articles on seo at this  seohawk.com Website. Really cool articles
Logged
bradthecdn
Guest
«Reply #28 on: January 15, 2011, 03:10:28 AM »
Bit of history for you 1st - C was invented inside the 70s by Dennis Ritchie, by the 80s it had turn into incredibly popular and a book (known as the C programming language) was published by Ritchie and Kernighan which acted as an informal standard (known as K&R C.) Throughout the 80s ANSI were working towards a formal standard, which appeared in 1989 called C89. Some finetuning was done in 1990 and a new standard, C90 was published.     
     
All good - until 1999, when another version of the standard was published, called C99. Why is this a problem? Well whilst compilers implement C90, none implement the whole of the C99 standard. You, may well be thinking that C99 isn't all that important then - wrong, C99 allows us to do things such as declare variables throughout the code and use the C++ (//) style comment... but whilst many compilers do support these, none promise to support all aspects of the standard. I have often wondered why.     
     
As an aside, there is some work towards a new standard, not sure if/when it will be released though - its informally called "C1x"
Logged
Pages: 1 [2]  All
Print
Jump to:  


Get Yoindia Updates in Email.

Enter your email address:

Ask any question to expert on eTI community..
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 22, 2024, 03:59:45 AM

Login with username, password and session length
Recent Replies
[November 21, 2024, 09:01:29 AM]

[November 16, 2024, 11:44:41 AM]

by Michaelraw
[November 13, 2024, 12:59:11 PM]

[November 08, 2024, 09:59:54 AM]

[November 07, 2024, 01:56:50 PM]

[November 07, 2024, 01:55:03 PM]

[November 07, 2024, 01:52:40 PM]

[November 07, 2024, 01:51:59 PM]

[October 30, 2024, 05:13:27 AM]

by ASIF
[October 29, 2024, 07:57:46 AM]
Yoindia Shayariadab Copyright © MGCyber Group All Rights Reserved
Terms of Use| Privacy Policy Powered by PHP MySQL SMF© Simple Machines LLC
Page created in 0.104 seconds with 25 queries.
[x] Join now community of 8506 Real Poets and poetry admirer