The three different kinds of MOd rewrite

Discussions about the phpBB2 Forum. How to get the best from this powerful script.

Moderator: Moderators

The three different kinds of MOd rewrite

Postby Peter77 » Wed May 10, 2006 10:27 am

Help me understand.
So far, I know that there are three different types of mod rewrites being presented in this site. what are they? do they all work with the SEO mod? and we can choose which ones to use or not to use right?

What happens to the links already indexed by all the search engines? when someone searches and they click on a link to my site, what will happen... a 404? Google as powerful as it is, can be very slow to update.
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Advertisement

Postby dcz » Wed May 10, 2006 12:50 pm

[EDIT] If you are reading this, then you surely need to read this.[/EDIT]

You are right,

Although mod rewrited url are a lot more efficient to be spidered well and even more to experience a good Page Rank (PR) transmission between pages, changing all url of an already well indexed website cannot be done without an appropriate strategy.

So first, the different proposed mod Rewrite solutions :

phpBB SEO Advanced Mod Rewrite :
    First, it's called advanced not because it is harder to install, but because, it is the one that needs the more caution to use.

    With this mod, url transformation will be :
    Code: Select all
    viewforum.php?t=xx      =>   forum-title-vfxx.html

    viewforum.php?t=xx&start=xx   =>   forum-title-vfxx-yy.html

    viewtopic.php?t=xx      =>   topic-title-vtxx.html

    viewtopic.php?t=xx&start=xx   =>   topic-title-vtxx-yy.html


    Which can be a very powerful Search Engine Optimization (SEO) enhancement, but must be used with great care.
    Cause here, user will in the end decide what will be the topic url. And it can be of no good for some type of forums, cause you don't want title such as "hey man, look at his new demo there awesome !!" to be injected in your sites urls.
    I am almost sure that a site with the majority of it's topic's url being this bad would not take advantage of the mod Rewrite, and even could be less appreciated by Search Engines in the end.

    So this can be very powerful, but should not be used on projects being to general or without a strong titling policy throughout the site, making sure only search-able keyword are being used in urls.

    Another thing to note about this particular mod is that some tweaks will be needed for every mod outputting url. My plan is to release patch for most of the possible add on outputting url.
    So far, this adaptation is done for the simple sub forum mod, the pseudo sub forum mod, phpBB Fetch All, Yahoo submit your site mod. CH support is also planned.

    All the script released here will work with all of the three phpBB SEO Mod rewrites.

phpBB SEO Mixed Mod Rewrite :
    A bit easier to install, and a bit less to do to adapt to other mods outputting url. Should be a bit faster too (I'll soon start some stats to exactly compare the three mod Rewrites performances, but don't worry, they are very good ;) )

    With this mod, url transformation will be :
    Code: Select all
    viewforum.php?t=xx      =>   forum-title-vfxx.html

    viewforum.php?t=xx&start=xx   =>   forum-title-vfxx-yy.html

    viewtopic.php?t=xx      =>   topicxx.html

    viewtopic.php?t=xx&start=xx   =>   topicxx-yy.html


    So, while still injecting title in forum url, which helps quite a lot to put weight on targeted keywords, this mod does not imply to run a strict titling policy for topics. Here, the admin is the only one to be able to choose the forum's titles so ... no worries.

    And the good thing for people changing their url to such standard (applies also to the advanced) is that you can, if you think better titles could be used for some forum, change the forum titles before applying the mod and then start using beautiful urls. It's no big deal to for example, get rid of one ore two useless words in those prior to install the mod, cause your url are going to change anyway, so it's the time to think about it.
    One having a forum named : "the super cool sport forum" could then prefer to go for "Sports" or even "Sport news" or whatever possible title still being user friendly, but with only useful words in it ("the", "super" and "cool" are obviously not good search-able keywords, but "sports" and "sport news" are really close to what could be a good target here).


phpBB SEO Simple Mod Rewrite :
    This is the "nothing to worry about" mod rewrite. This one will rewrite all url from all mods without any additional changes. It's the fastest and lightest.

    With this mod, url transformation will be :
    Code: Select all
    viewforum.php?t=xx      =>   forumxx.html

    viewforum.php?t=xx&start=xx   =>   forumxx-yy.html

    viewtopic.php?t=xx      =>   topicxx.html

    viewtopic.php?t=xx&start=xx   =>   topicxx-yy.html


    Meaning, not title injection at all.
    It's a bit less efficient for Page Ranking, but PR transmission will work the same. Actually, a lot of forums are very well ranked with static mod rewrites, even if they would have had better results with very good title injection (only good keywords in urls).
    The main goal of this one is to propose solution for people already using a mod Rewrite on their board, but willing to enhance it.


Cause here come what's better in all cases with the phpBB Mod Rewrites.
First, they do not us ob_start(), so they end up being a lot faster and lighter. Title injection is done without any additional sql query and the RegEx performing the injection is not performed on all outputted code but only on outputted url (must be over 90% less code to match than a regular mod performing those on the buffered output).
Actually, I think the advanced phpBB mod Rewrite should be as fats as a regular static mod Rewrite using ob_start(), while doing so much more in the end.
And, there are no more duplicates links within pagination, which is a very great SEO enhancement.

So the idea here is, even if your site is already using a mod Rewrite, switching to a phpBB SEO one will 1) save some server resource, 2) output a lot less duplicates and thus lead to better SEO results ;)
And I will release version of those for any url Standards, so that one won't have to change all of it's rewritten url to upgrade ;)

So this will I think be the main interest of the simple one, to make it possible for people already using a static one and already well indexed, to enhance their url handling without jeopardizing anything as far as SEO.

Anyone willing to first try a mod rewrite should first think about the Mixed mod Rewrite, then think about topic title injection (is a topic titling policy doable without more work than one can put into it). Cause for sure, the Mixed mod rewrite, while still being a lot more powerful than a simple, is as easy to deal with and almost as light.


Then, once you'd have chosen, there are many thing to do to get re-indexed well. First, you'd have to use the Google tools to remove url from it's listing and disallow all the old url with the robots.txt.

For sure this would mean that your site will have to be re indexed, but, if it already was, then you should have a PR above 0 and thus, it should be faster than the first time. Than, you are being helped by the mx Google sitemap module that will give all your new url to Google in very few page loads.

And yes, the natural phpBB url wil still work, meaning, all the old links will still work.

Another thing to think of could be to edit your db to change posted links to the new one, easy to do with static rewrites, almost impossible with many topics and advanced.

I hope I was clear enough ;)

Fell free to ask more details, since this is a crucial choice to make ;)
Last edited by dcz on Thu Jun 08, 2006 5:28 pm, edited 3 times in total.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21374
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Wed May 10, 2006 5:42 pm

Yes much clearer thank you. So I decided to go advanced because even though there are some mindless banter game topics in an entertianment forum, I do have intresting articles and information on my site. I can always set the permissions to that forum as registerd members only... so that search engines do not index those threads. so I will definitely use the Advanced one.

so.. I do have a small question about my threads and forums names. I did this little modification to my board a couple of weeks ago:

Remove "View Forum - " text...
Edit file 'viewforum.php'

Replace line...
$page_title = $lang['View_forum'] . ' - ' . $forum_row['forum_name'];
with line...

$page_title = $forum_row['forum_name'];

Remove "View topic - " text...
Edit file 'viewtopic.php'

Replace line...
$page_title = $lang['View_topic'] .' - ' . $topic_title;
with line...

$page_title = $topic_title;


Will I have to change this back before installing the Advanced mod rewrite?

And yes, the natural phpBB url wil still work, meaning, all the old links will still work.


So if on a google search my site url is http://example.com/phpbb/viewforum.php?t=x
the URL automaticly turns into http://example.com/phpbb/forum-title-vfxx.html upon visiting the site?
so then the pourpose of reindexing my site would be because of the new SEO links and not so much because the URLs have 'changed' right?

Then, once you'd have chosen, there are many thing to do to get reindexed well. First, you'd have to use the Google tools to remove url from it's listing and disallow all the old url with the robots.txt.


That means to not allow search engines into phpbb/index.php, phpbb/viewforum.php ect, ect and allow them into phpbb/new-seo-url.html?


I assume you have a google sitemap account too? just a quick question about google sitemap account: inside my account it says " google last indexed your site on May 1." is this normal? becuase I "see" Googlebot crawling my pages every other day.
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby dcz » Thu May 11, 2006 10:06 am

Peter77 wrote:Yes much clearer thank you. So I decided to go advanced because even though there are some mindless banter game topics in an entertainment forum, I do have intresting articles and information on my site. I can always set the permissions to that forum as registerd members only... so that search engines do not index those threads. so I will definitely use the Advanced one.


Anyway, you will always be able to edit the worst of them, it's just something to take care of. Very Doable ;)

Peter77 wrote: so.. I do have a small question about my threads and forums names. I did this little modification to my board a couple of weeks ago:
...
Will I have to change this back before installing the Advanced mod rewrite?


Well no, but I'll soon release a dynamic meta mod, which will change this part of the code also, but, not necessarily in a very different way. The main changes will be elsewhere, and I am sure you'll figure it out very easy, since you kept track of you changes (very good thing to do actually ;) )

Peter77 wrote:So if on a google search my site url is http://example.com/phpbb/viewforum.php?t=x
the URL automaticly turns into http://example.com/phpbb/forum-title-vfxx.html upon visiting the site?
so then the pourpose of reindexing my site would be because of the new SEO links and not so much because the URLs have 'changed' right?

Nope, they'll work as his. It is possible to built re-directions for static mod rewrites, even though it means to run a heavier set of rewriterules, but for title injection, it's tougher.
Actually, one could do such job using php, but it would mean more server load.
Actually, this thread could be a good occasion to try to build up such script, but, it's not that much of a big deal to just disallow those links with the robots.txt and to wait a bit for the new one to be indexed.
But if you are willing to give a try implementing such a php script, I'll post some code, but it probably won't be before next week.

Peter77 wrote:That means to not allow search engines into phpbb/index.php, phpbb/viewforum.php ect, ect and allow them into phpbb/new-seo-url.html?


Yes, in the end it should look like :
Code: Select all
Disallow: /phpbb/index.php?
Disallow: /phpbb/posting.php
Disallow: /phpbb/modcp.php
Disallow: /phpbb/login.php
Disallow: /phpbb/privmsg.php
Disallow: /phpbb/viewonline.php


And you also could add :
Code: Select all
Disallow: /phpbb/faq.php
Disallow: /phpbb/profile.php
Disallow: /phpbb/groupcp.php


Cause those aren't really the good search-able pages.

Peter77 wrote:I assume you have a Google sitemap account too? just a quick question about Google sitemap account: inside my account it says " google last indexed your site on May 1." is this normal? becuase I "see" Googlebot crawling my pages every other day.


Yes ;)

The time data provided there only concern your sitemap, meaning, it's the last time Google downloaded it.
But actually, there is something I am not sure about is if those stats are updated when Google visit a sitemap or if it only concern the sitemapIndex. Look up your server logs ;)

Mine are visited every day, but it depends also how much they change. The more new post you'll have, the more you sitemaps will move and the more Google will visit them.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21374
Joined: Fri Apr 28, 2006 9:03 pm

Postby sceltic » Fri May 12, 2006 8:58 pm

Hi

I am still testing when I can

I would like to look at the injection url to see what it might entail for possible use, where is the download section for the mods?
sceltic
PR0
PR0
 
Posts: 55
Joined: Thu May 04, 2006 4:07 pm

Postby Peter77 » Sat May 13, 2006 4:57 am

dcz wrote:Nope, they'll work as his. It is possible to built re-directions for static mod rewrites, even though it means to run a heavier set of rewriterules, but for title injection, it's tougher.
Actually, one could do such job using php, but it would mean more server load.
Actually, this thread could be a good occasion to try to build up such script, but, it's not that much of a big deal to just disallow those links with the robots.txt and to wait a bit for the new one to be indexed.
But if you are willing to give a try implementing such a php script, I'll post some code, but it probably won't be before next week.


Well I was just concernd that the 'old' phpbb url's found on Yahoo, Google,ect would not work upon clicking on the links and returning a 404, but I see they do work now that I installed the mod rewrite and looked for myself. so yeah, I'll just wait for the new links to get indexed. :)




Okay thanks for all your feedback, dcz. ok I installed the Advanced on my viewtopic.php, and viewforum.php and search.php. everything seems working fine... the links are SEO friendly. the only odd thing is that some of things I have on my sites root directory ( or mxbb ) will not show. as if I have the permissions restricted. like images, and my theme css file. browsing around the site, the images show up, but thats probably because of my browsers cache.


::edit:: okay... seems as though it is only an IE problem. I take it your not a big fan of IE lol. works great with FF, of course...

I also have the Blog MOD on my site. can we get that SEO friendly as well?
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby dcz » Sat May 13, 2006 10:16 am

Good,

It should not be a problem for any browser to use those mods, could you tell me what happened more precisely ?

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21374
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Sat May 13, 2006 6:05 pm

dcz wrote:Good,

It should not be a problem for any browser to use those mods, could you tell me what happened more precisely ?

++


Any image hosted in my sites main directory is restricted. images that are stored in my mxbb or main directory are not showing up on my portal. small images like the menu gif or forum new_folder.gif, for example. they do show up on my browser if I apply the URL to the address bar.

Portal login problem: I can not log in from the mxbb portal login.php
This is for both IE and FF. no errors, it just resets to blank entry. I can log in from my phpbb though. so at the moment, I have a redirct from my portals login.php to my phpbb's login.php.
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby dcz » Mon May 15, 2006 7:40 pm

Now this is strange.

Would you post (or PM) a link to your site for me to have a look at this.

This should not happen with the code you are using because images links do not go through the append_sid function.

But, I am thinking that in the mxBB portal case, the RegEx performing the Rewriting could be tricked if you are using a GET var "c" like phpBB do for Categories.

I just need to know a bit more to find out where could the problem come from.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21374
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Tue May 16, 2006 12:47 am

Alright. I sent you a user account and password so you can also see what I mean about the portals login issue.
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby dcz » Tue May 16, 2006 9:45 am

Now this is weird, and I really do not think this could be linked to one of the rewrite Mods here.

When I load your home, I get a small error on the page with IE, but non with FF, which does not mean that much since the page do load correctly in the end for both.

So fir the images, I am wondering if :
1) The problem would not come from connection problem (did you try from elsewhere?)
2) Or it could be linked to some extra toolbar and / or plug-in you could use with IE (Are you sure this never happened before and did you try with a fresh install of the latest IE ?)

Then, for the log in problem, it seems you implemented some extra script to output a custom messages when the path is incomplete.
The weirdest thing is that the links itself changes :

When using the log-in link, I en up on root/login.php instead of root/forum/login.php, so I am wondering if your custom code did not mess up path as well, cause if I manually go to root/forum/login.php with IE, no problem to log in. So I don't think this is a browser issue.

Then, for the mod rewrite specific, it seem you do not use the regular phpBB index at all, redirecting it to the embed portal's page.

My advice for now would be to rather use the regular forum index, or at least an optimized url for the portal page.

I do prefer the regular phpBB index myself, because I don't really see the point of messing url the mxBB way for it and it is not this hard to just add or hard code a nav menu in it, if you really want it.
Because this would save an not really SEO friendly url.

But, as well, I can provide you with the code changes to apply on the mx_forum.php file in the mod_rewrite forum (by the way it must be very similar to the code changes proposed for the phpbb index.php file).

As a conclusion, I really do not think the problem you described could be linked to the phpBB SEO Mod rewrites.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21374
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Tue May 16, 2006 8:39 pm

dcz wrote:Now this is weird, and I really do not think this could be linked to one of the rewrite Mods here.

When I load your home, I get a small error on the page with IE, but non with FF, which does not mean that much since the page do load correctly in the end for both.

So fir the images, I am wondering if :
1) The problem would not come from connection problem (did you try from elsewhere?)
2) Or it could be linked to some extra toolbar and / or plug-in you could use with IE (Are you sure this never happened before and did you try with a fresh install of the latest IE ?)

Then, for the log in problem, it seems you implemented some extra script to output a custom messages when the path is incomplete.
The weirdest thing is that the links itself changes :

When using the log-in link, I en up on root/login.php instead of root/forum/login.php, so I am wondering if your custom code did not mess up path as well, cause if I manually go to root/forum/login.php with IE, no problem to log in. So I don't think this is a browser issue.


Very weird... but I think it may have more to do with my .htaccess file, that is why i sent you a copy of it... maybe I have it wrong? because when I take the rewrite code out of my .htaccess file, the login issue is no longer an issue. I had Cpanel redirect my portals login.php file to my phpbb login.php but since I wanted you to see the problem for yoruself, I disactivated the redirect script. I left a small message to members on the login_body.tpl ( mxbb ) because they have no clue to what i'm doing to the site... so as to not confuse anyone, I put a small message on the portals log in page.



dcz wrote:Then, for the mod rewrite specific, it seem you do not use the regular phpBB index at all, redirecting it to the embed portal's page.

My advice for now would be to rather use the regular forum index, or at least an optimized url for the portal page.

I do prefer the regular phpBB index myself, because I don't really see the point of messing url the mxBB way for it and it is not this hard to just add or hard code a nav menu in it, if you really want it.
Because this would save an not really SEO friendly url.

But, as well, I can provide you with the code changes to apply on the mx_forum.php file in the mod_rewrite forum (by the way it must be very similar to the code changes proposed for the phpbb index.php file).

As a conclusion, I really do not think the problem you described could be linked to the phpBB SEO Mod rewrites.

++


I went ahead and took your advice on using phpbb regular index.php instead. I figuered I might as well do it now since Google is currently rebuilding my sites PR agian.


Okay so... the images problem somehow 'fixed' itself. I am using Avant Browser which is basicly the IE engine but with tabs. im always upgrading my avant browser since they are always updating differnt builds ect. the log in issue remains.. even with FF and regular IE. and yes I even tried loggin in from a differnt computer.

If you could please take a second look at my .htaccese ( in your pm ) and see anything unsuall. and yes, I used the part for phpp being in a sub directory.


Thanks for helping me out on this. I do appreciate it, dcz. :)
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby dcz » Tue May 16, 2006 10:05 pm

Well,

The first thing I'd look for here is your Cpanel settings. You should not need any redirection on this link.

The second thing would be the php code, the link is build in the mx page_header.php. Compare the code for U_LOGIN_LOGOUT with a fresh copy of it, and try to overwrite the mx login.php you are using with a fresh one (unless you did mod it).

Then, but this is like a mystical guess, try removing the Options +FollowSymlinks in the .htaccess, and why not the rewriterule taking care of the www to see what happens.

Those two can change behaviour a bit upon server settings.

Then, again, I don't really see how this .htaccess could mess up with images. Have you had a look to your server logs to find out more ?
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21374
Joined: Fri Apr 28, 2006 9:03 pm

Postby Peter77 » Tue May 16, 2006 11:01 pm

dcz wrote:Well,

The first thing I'd look for here is your Cpanel settings. You should not need any redirection on this link.

The second thing would be the php code, the link is build in the mx page_header.php. Compare the code for U_LOGIN_LOGOUT with a fresh copy of it, and try to overwrite the mx login.php you are using with a fresh one (unless you did mod it).

Then, but this is like a mystical guess, try removing the Options +FollowSymlinks in the .htaccess, and why not the rewriterule taking care of the www to see what happens.

Those two can change behaviour a bit upon server settings.

Then, again, I don't really see how this .htaccess could mess up with images. Have you had a look to your server logs to find out more ?


dcz, even with "mystical guesses" you are still good lol 8) well I took out the rewriting rule - just that line. and it worked like a charm. I left in Options +FollowSymlinks because it was not causing the problem.

So help me understand what the rewriting rule is used for. why would it affect images and css? my SEO links still work the same. they have not been affected. is it harmless to not have this line in my .htaccess anymore?

I just had a member complain today about the sites portal looking white. another words the .css was not working. but I just tested my KB header... inserted the mxbb path to my themes .css and it seems to be working fine too. :)
Peter77
phpBB SEO Team
phpBB SEO Team
 
Posts: 532
Joined: Wed May 10, 2006 9:46 am

Postby dcz » Wed May 17, 2006 8:43 am

All right,

Actually, there are tons of threads talking about the WWW thing, and no working for all solution, even though in the end, a specific solution exist for all.

Please try this one instead :
Code: Select all
#Make sure the www is present
RewriteCond %{HTTP_HOST} !^www.example.com [NC]
RewriteRule ^(.*) http://www.example.com/$1 [QSA,R=301,L]


Noticed, no more "\".

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21374
Joined: Fri Apr 28, 2006 9:03 pm

Next

Return to phpBB2 Forum

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 9 guests