9
   

phpBB Search Engine Optimization - Sessions, static ( SEO )

 
 
nonstop
 
  1  
Fri 15 Oct, 2004 05:38 pm
I have a problem,

I'm trying to alter the output before it reaches the browser, phpbb uses a self modifying code. php's eval function.

on line 126 of includes/template.php

Code:eval($this->compiled_code[$handle]);


so I tried to capture the output into a buffer using...

Code:ob_start();
eval($this->compiled_code[$handle]);
$data = ob_get_contents();
ob_clean();
echo $data;


this woks fine and the forums work brilliantly only the links have
reverted back to the old way - viewforum.php?f=63 instead of forum-63.html

what's happend? did I miss something? Confused

How can I fix it?
0 Replies
 
Craven de Kere
 
  1  
Fri 15 Oct, 2004 08:00 pm
Well, the mod is doing the same thing. ;-)

With this code here:

Code:
if ( !$userdata['session_logged_in'] )
{
$contents = ob_get_contents();
ob_end_clean();
echo replace_for_mod_rewrite($contents);
global $dbg_starttime;
}
0 Replies
 
nonstop
 
  1  
Fri 15 Oct, 2004 08:12 pm
thanks Craven that looks a better place to add my code Smile
0 Replies
 
swordfishentral
 
  1  
Sat 16 Oct, 2004 11:20 pm
I would like to hire someone to run this script for my site Edit (Moderator): link removed.

I need this done ASAP!

thanks,
Mike
0 Replies
 
Drew000
 
  1  
Mon 18 Oct, 2004 09:55 pm
Has it been tried on IIS.
Requirements for this mod state that it only works on Apache. Has it been tried on IIS.

You state that it works with phpbb2.0.6+ I assume that includes the latest version 2.0.10

Thanks
0 Replies
 
Craven de Kere
 
  1  
Mon 18 Oct, 2004 10:41 pm
Re: Has it been tried on IIS.
Drew000 wrote:
Requirements for this mod state that it only works on Apache. Has it been tried on IIS.


IIS needs special commercial plugins to perform mod_rewrite (this is one of the reasons I avoid using Windows for a server platform), so only the static URLs portion of the mod is not meant for IIS.

Quote:
You state that it works with phpbb2.0.6+ I assume that includes the latest version 2.0.10


Yes, I have installed it on various 2.0.10 forums.
0 Replies
 
Drew000
 
  1  
Tue 19 Oct, 2004 08:45 am
Thank you very much for your help.

Using the information you provided we are planning to substitute Helicontech's url manipulation engine in place of the static url portion of your mod and use everything else as specified in your mod.

Do you see any problems with this course of action? Is there another course of action you would recomend?
0 Replies
 
Craven de Kere
 
  1  
Tue 19 Oct, 2004 08:56 pm
Personally? I'd use Linux/Apache.

I can't vouch for ISAPI_Rewrite. I might try to use it in the future on some of the Windows boxes my company runs, but for webservers I generally prefer Linux/Apache.
0 Replies
 
colins
 
  1  
Wed 20 Oct, 2004 05:08 am
Cant get the static url mod to work Smile
Hi there i am trying to do this static mod. I have downloaded all the mod files but only done what it said to do in the one static mod file. not the others.

The problem is that i still get massive urls and no html urls.
I am not logged in and i run apache with mod rewrite on.
I am using a new install of phpbb.


One thing tho is that i didnt have an htacceess file so i took just the contence of the htaccess bit in the mod and created a .htassecc file with just that information from the mod in it.

Any Ideas ?
Thanks

Also does anybody have or know of where i can get a pre modded phpbb install with the mod allready done ?

Thanks for your time Colin Smith
0 Replies
 
Drew000
 
  1  
Thu 21 Oct, 2004 07:00 pm
Craven de Kere wrote:
Personally? I'd use Linux/Apache.

I can't vouch for ISAPI_Rewrite. I might try to use it in the future on some of the Windows boxes my company runs, but for webservers I generally prefer Linux/Apache.



Were this many years ago and I could gaze into the future I would switch to linux. But so much of what we have is tied to Win2000 that it's difficult to make the change.

If you wish I'll let you know how the installation turns out.
0 Replies
 
Craven de Kere
 
  1  
Thu 21 Oct, 2004 11:21 pm
Re: Cant get the static url mod to work Smile
colins wrote:
The problem is that i still get massive urls and no html urls.
I am not logged in and i run apache with mod rewrite on.
I am using a new install of phpbb.


In this case, you either did not apply the mod correctly, or you have other modifications that conflict with the code.

Quote:
Also does anybody have or know of where i can get a pre modded phpbb install with the mod allready done ?


Most "pre-modded" packages are an SEO and useability nightmare, as they tend to just cram all the mods they can figure out how to install into a package.

So while I have heard of several modded-phpbb releases using my mods, I find it pointless and didn't bother remembering which.

I have not released a pre-modded version, as I prefer manual modding.

In the future it's possible that I'll release one, with the changes I use on Able2Know.

Drew000 wrote:
Were this many years ago and I could gaze into the future I would switch to linux. But so much of what we have is tied to Win2000 that it's difficult to make the change.


I know what you mean. I'd like to try to convince my company to use Linux, but they have so much time and money invested in their apps that they can't.

Quote:
If you wish I'll let you know how the installation turns out.


I'd appreciate it, as I may wish to use ISAPI_Rewrite for my company's apps.
0 Replies
 
alycad
 
  1  
Fri 22 Oct, 2004 01:11 pm
I there Very Happy Very Happy Very Happy Very Happy Very Happy

congratulation to Kraven and all the guys that have worked on this mod :p

As usual, im a newbbie in this mod.....

I finished install this mod right know. My question is that if this requierements are correct?
Code:
Operating system Linux
Service Status Click to View
Kernel version 2.4.21-20.EL
Machine Type i686
Apache version 1.3.31 (Unix)
PERL version 5.8.4
Path to PERL /usr/bin/perl
Path to sendmail /usr/sbin/sendmail
Installed Perl Modules Click to View
PHP version 4.3.9
MySQL version 4.0.20-standard
cPanel Build 9.9.7-CURRENT 4
Theme cPanel X v2.5.0
Documentation Click to View


What now? Must i do something else? how should i test the mod?

See u in a while,

Alvaro Martins
Portugal
0 Replies
 
alycad
 
  1  
Fri 22 Oct, 2004 01:19 pm
By the way....

my robots.txt on Edit (Moderator): link removed

Code:
User-agent: *
Disallow: /admin/
Disallow: /attach_mod/
Disallow: /db/
Disallow: /files/
Disallow: /images/
Disallow: /includes/
Disallow: /language/
Disallow: /mycalendar_mod/
Disallow: /spelling/
Disallow: /templates/
Disallow: /common.php
Disallow: /config.php
Disallow: /glance_config.php
Disallow: /groupcp.php
Disallow: /memberlist.php
Disallow: /mini_cal.php
Disallow: /modcp.php
Disallow: /mycalendar.php
Disallow: /news_insert.php
Disallow: /posting.php
Disallow: /printview.php
Disallow: /privmsg.php
Disallow: /profile.php
Disallow: /ranks.php
Disallow: /search.php
Disallow: /statistics.php
Disallow: /tellafriend.php
Disallow: /viewonline.php




My .htaccess file is empty.... an is located at:

Edit (Moderator): Link removed

I read somewhere ( and dont know where ) that i may have to change this two files,

Are they correct like that? Should i mod them?

Thanks agains,

Alvaro Martins
Portugal
0 Replies
 
alycad
 
  1  
Sat 23 Oct, 2004 06:52 am
Mr Moderador.... can you help me? or u just erase ilegal links?

Cumps,

Alvaro Martins

Portugal
0 Replies
 
alycad
 
  1  
Sat 23 Oct, 2004 09:14 am
alycad wrote:
By the way....

my robots.txt on Edit (Moderator): link removed

Code:
User-agent: *
Disallow: /admin/
Disallow: /attach_mod/
Disallow: /db/
Disallow: /files/
Disallow: /images/
Disallow: /includes/
Disallow: /language/
Disallow: /mycalendar_mod/
Disallow: /spelling/
Disallow: /templates/
Disallow: /common.php
Disallow: /config.php
Disallow: /glance_config.php
Disallow: /groupcp.php
Disallow: /memberlist.php
Disallow: /mini_cal.php
Disallow: /modcp.php
Disallow: /mycalendar.php
Disallow: /news_insert.php
Disallow: /posting.php
Disallow: /printview.php
Disallow: /privmsg.php
Disallow: /profile.php
Disallow: /ranks.php
Disallow: /search.php
Disallow: /statistics.php
Disallow: /tellafriend.php
Disallow: /viewonline.php




My .htaccess file is empty.... an is located at:

Edit (Moderator): Link removed

I read somewhere ( and dont know where ) that i may have to change this two files,

Are they correct like that? Should i mod them?

Thanks agains,

Alvaro Martins
Portugal

Code:
##############################################################
## MOD Title: phpBB static URLs mod_rewrite 1.0.0
## MOD Author: Craven de Kere (N/A) http://www.Able2Know.com
## MOD Description: This mod should be added AFTER the Able2Know.com SEO mod
## This mod makes static URLs (only for guests) for phpBB, for example topic-22234.html
## Please read the author notes BEFORE using this mod.
## Check http://www.able2know.com/forums/about15132.html
## for the latest version or to get help with this MOD
##
## MOD Version: 1.0.0
##
## Installation Level: (Advanced)
## Installation Time: 5 Minutes
## Files To Edit: page_header.php,
## Included Files: n/a
##############################################################
## Author Notes:
## Use this mod together with the Able2Know.com SEO Mod (http://www.able2know.com/forums/about15132.html)
## Make backups and test this on a test forum if you can. This is not a typical mod.
## For an additional tutorial on preventing IP addresses from being logged see:
## http://www.able2know.com/forums/about22586.html
##
##############################################################
## MOD History:
##
## 2004-04-10 - 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 ]------------------------------------------
#

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 ]------------------------------------------
#

.htaccess

#
#-----[ ADD ]------------------------------------------
#

RewriteEngine On
RewriteRule ^forums.* 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]


#
#-----[ OPEN ]------------------------------------------
#

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$

#
#-----[ 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


I miss this part of the mod....

now i have done it, and try it... nothing happens.

the .htaccess file must be on domain root? or on the forum root?

The robots should be where? domain root? or on the forum root?


I have 2 .htaccess files... one on the forum root and another on the domain root. Is this ok?

Thanks once more,

Alvaro Martins
Portugal
0 Replies
 
Craven de Kere
 
  1  
Sat 23 Oct, 2004 02:10 pm
alycad wrote:

I finished install this mod right know. My question is that if this requierements are correct?


Se voce esta com um forum phpBB funcionando voce ja pode installar o primeiro parte deste modificacão.

O parte que muda os URLs para URLs com extencão de .html necessita accesso ao mod_rewrite, que voce não confirmou.

O jeito mas facil de saber se voce pode utilizar mod_rewrite é intsllar o codigo de .htaccess que providenciei é depois vai para o directorio do seu forum e ve se forums.html mostra o conteudo do index.php

alycad wrote:
By the way....

my robots.txt on...


Este modificaão não necesita qualquer mundança do robots.txt, mas se voce quiser mudar-lo tem que o utilizar no primeiro directorio do seu domain e o arquivo robots.txt tem que utilizar os camiñhos certos para o seu directorio do seu forum.

Quote:
My .htaccess file is empty....


Qualquer directorio pode ter um arquivo .htacess.

O meu codigo conta com voce usando o .htaccess no directorio do seu forum.

Quote:
now i have done it, and try it... nothing happens.


So funciona se voce esta olhando o forum como um guest.

Quote:
the .htaccess file must be on domain root? or on the forum root?


Forum

Quote:
The robots should be where? domain root? or on the forum root?


domain

Quote:
I have 2 .htaccess files... one on the forum root and another on the domain root. Is this ok?


sim
0 Replies
 
AfterHim
 
  1  
Sat 23 Oct, 2004 04:44 pm
I don't know what my problem is, but it didn't work for me, can someone check it out at:

Edit (Moderator): Link removed

thanks,

brandon
0 Replies
 
Craven de Kere
 
  1  
Sat 23 Oct, 2004 04:47 pm
Brandon,

What "didn't work"?

I had a look, and you clearly made mistakes when applying the mod. Do it by hand (if you used an automated way to apply it) and folow the steps and it should work.

If it doesn't, tell us what isn't working.
0 Replies
 
AfterHim
 
  1  
Sat 23 Oct, 2004 04:50 pm
Craven,

I did it by hand...took me about 45 minutes. It was obviously a fresh install...

is there something particular I should try, or just do it all again?
0 Replies
 
Craven de Kere
 
  1  
Sat 23 Oct, 2004 04:54 pm
I saw more than one mistake on just the index page (the lang file modification without custom text, links to profiles not removed), and only spending a few seconds looking.

So I'd go for a fresh try.
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.04 seconds on 05/17/2024 at 02:22:11