| |
|
| :: |
| Author |
Message |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Thu May 25, 2006 8:22 pm Post subject: [Archive] phpBB SEO Simple mod Rewrite V 0.0.2 |
|
|
WARNING
0.2.0 is out : To update please read this thread .
What follows is kept for archive.
0.0.2 support will continue for some time for 0.0.2 user, until they update.
Do not use this version if you are first installing this mod.
---------------------------------------------------------------------------------------
[DEV] phpBB SEO Simple mod Rewrite V 0.0.2 - UPDATED
Before you do anything :
Please read carefully this post, you will save time and will not risk to jeopardise your web-site's PageRanking.
Under construction Topic.
From now on, the English versions will see the profiles URL to be : memberxx.html (membrexx.html in the French one).
This mod is working fully with phpBB vanilla (unmodded), special patch may be required for some mods, like simple sub forum. Many of them already exist here.
It will not output any pagination duplicates.
You should think about which solution will best fit your forum project before you install any of the three phpBB SEO mod Rewrite.
As well you should think about your robots.txt as well as about the www prefix issue.
The mx Google Siteamps and mx Sitmaps are, off course, compatible, useful and a requirement to help out Search Engines to Crawl you site well.
You can as well find out a lot of interesting Search Engine Optimization (SEO) parameters thanks to our phpBB SEO webmaster Tools
You should perform test locally or on a test server before you use this setup on a live site. This will prevent many small path issues in .htaccess from becoming too stressing for you
To load mod Rewrite with Easyphp :
Open EasyPHP1-8\conf_files\httpd.conf and uncomment
(get rid of the "#" at the beginning of the required lines) those two lines :
| Code: | | LoadModule rewrite_module modules/mod_rewrite.so |
And :
| Code: | | AddModule mod_rewrite.c |
Don't forget to install the Cyber alien Guest session mod or any other SID removal method you may prefer.
| Code: | ##############################################################
## MOD Title: phpBB SEO Simple mod Rewrite
## MOD Author: dcz <n/a> http://www.phpbb-seo.com/
## MOD Description: This mod makes static URLs for phpBB
## Please read the author notes BEFORE using this mod.
## Check http://boards.phpbb-seo.com/phpbb-mod-rewrite/phpbb-seo-simple-mod-rewrite-vt45.html
## for the latest version or to get help with this MOD
##
## MOD Version: 0.0.2
##
## Installation Level: (Advanced)
## Installation Time: 3 Minutes
## Files To Edit: (5)
## .htaccess,
## index.php,
## includes/function.php,
## includes/session.php,
## viewtopic.php
## search.php
## Included Files: n/a
##############################################################
## Author Notes:
##
## This mod require running Apache Server with mod_Rewrite On.
##
## This mod requires the Cyber Alien guest session mod (http://www.phpbbstyles.com/viewtopic.php?t=357).
##
## With this mod, your phpBB URL will change :
##
## index.php?c=xx => catxx.html
##
## 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
##
## viewtopic.php?p=xx => postxx.html
##
## profile.php?mode=viewprofile&u=xx => memberxx.html
##
## This mod has nothing in common with other phpBB mod rewrite, it will perform the URL rewriting
## without using ob_start(), thus faster and not messing anymore whith Gun-Zip nor with the html link format,
## and will not output any pagination duplicate.
##
## This is the lightest and easiest way to deal with phpBB SEO mod Rewrite. It will rewrite all phpBB URL built using
## the append_sid() phpBB function (e.g . all decent phpBB mods ;-) ) without any additional changes.
## No issue whatsoever.
##
## NOTE : phpBB SEO recommend the use of the phpBB SEO mixed mod Rewrite in almost all cases. But this mod can be very
## convenient to allow migration from other heavier static mod Rewrites outputting many duplicates.
## Please read : http://boards.phpbb-seo.com/phpbb-seo-toolkit/phpbb-seo-mod-rewrites-vt66.html
##
## This mod is and will be compatible to all phpBB SEO modules, specific install instructions may apply.
## phpBB SEO will provide patches to allow for other URL standards support upon request,
## so that everyone can take advantage of the phpBB mod Rewrites enhancement without jeopardising his Page-Ranking.
##
## Migrating from another mod Rewrite is as well possible but should be done with care to make sure you won't loose Page-Ranking.
##
####
## 0.0.1 => 0.0.2 Update : Required changes to be found in 0.0.1_.0.02_Simple_Update.txt
####
##
## LICENSE:
##
## We, phpBB SEO, have decided to license this mod under the RPL Licence ( http://www.opensource.org/licenses/rpl.php )
## which states you cannot remove the phpBB SEO credits and if you make any modifications you have to resubmit them
## to phpBB SEO for inclusion into this package again. You can read the license for yourself for further info.
##
## You can of course use this mod without any more limitations than those stated here and in the licence.
##
## At least a link ( http://www.phpbb-seo.com/ ) is required on every web site using this mod, or,
## if your web site does not comply with what phpBB SEO can link to, one proven link within a
## general audience hard link directory of your choice not already listing phpBB SEO.
## For more details about possible exeptions, please contact a phpBB SEO administrator (primarily SeO or dcz).
##
## Failure to comply will jeopardize support.
##
##############################################################
## MOD History:
##
## 2006-06-20 - 0.0.2
## - Added highlight fix in search.php adn fixed a small bug in search results (results posts)
## - Optimized the append_sid() filtering.
##
## 2006-05-25 - 0.0.1
## - First Beta Version
##
## 2006-03-01 - 0.0.0
## - Initial beta testing phase
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
############################################################## |
Download phpBB SEO Simple mod Rewrite V 0.0.2
Download phpBB SEO Simple mod Rewrite V 0.0.2 - Categories Hierarchy (CH) Edition
The robots.txt :
The robots.txt file must be uploaded in your domain's root folder.
you must obviously change phpbb/ with your real phpBB installation folder (or with nothing if it's installed in the root).
| Code: | User-agent: *
Disallow: /phpbb/viewtopic.php
Disallow: /phpbb/viewforum.php
Disallow: /phpbb/index.php?
Disallow: /phpbb/posting.php
Disallow: /phpbb/groupcp.php
Disallow: /phpbb/search.php
Disallow: /phpbb/login.php
Disallow: /phpbb/privmsg.php
Disallow: /phpbb/post |
This is the minimum required for bots to only consider the rewritten URLs.
The index.php? is absolutely normal and does not disallow index.php
After this you can add :
| Code: |
Disallow: /phpbb/member
Disallow: /phpbb/profile.php
Disallow: /phpbb/memberlist.php
Disallow: /phpbb/faq.php |
If you don't want to put too much weight on those, by the way attractive to spammers. Will save some "useless" bot visits as well.
You may need to implement additional disallows if you changed URL standard for example.
French support for this mod. |
_________________ 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
Last edited by dcz on Tue Jan 23, 2007 2:24 am; edited 3 times in total |
|
| Back to top |
|
 |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Sun Jul 09, 2006 3:51 pm Post subject: Re: [Archive] phpBB SEO Simple mod Rewrite V 0.0.2 |
|
|
I am currently working on enhancing phpBB links and to organise the phpBB SEO Toolkit. I thought the next and previous topic links should not be shown to guest any more as they are duplicates, and that this change was to be added in this mod, as it requires very few changes.
Here is the code change that will be added to the next version, you can implement it now as it's final
| Code: |
#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=next");
//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
'url' => $view_prev_topic_url,
'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
'url' => $view_next_topic_url,
'title' => $lang['View_next_topic']
);
#
#-----[ REPLACE WITH ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if ($userdata['session_logged_in']) {
$view_prev_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=previous");
$view_next_topic_url = append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&view=next");
//
// Mozilla navigation bar
//
$nav_links['prev'] = array(
'url' => $view_prev_topic_url,
'title' => $lang['View_previous_topic']
);
$nav_links['next'] = array(
'url' => $view_next_topic_url,
'title' => $lang['View_next_topic']
);
}
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM |
 |
_________________ 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 |
|
 |
macnack PR0

Joined: 20 Jun 2006 Posts: 96
|
Posted: Mon Jul 31, 2006 7:29 pm Post subject: Re: [Archive] phpBB SEO Simple mod Rewrite V 0.0.2 |
|
|
Hello
I want to use simple mod rewrite with ch_phpbb but the instructions line in rewrite_mod I don´t find in my viewtopic.php |
_________________ macnack |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
macnack PR0

Joined: 20 Jun 2006 Posts: 96
|
Posted: Tue Aug 01, 2006 4:22 am Post subject: Re: [Archive] phpBB SEO Simple mod Rewrite V 0.0.2 |
|
|
Hello dcz
I mean this part | Code: | #
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
//
// Send vars to template
//
#
#-----[ AFTER, ADD ]------------------------------------------
# Dans cette partie, vous pouvez choisir de ne pas utiliser de highlight, ce qui, d'un point de vue du référencment est
# plus efficace, mais cela retire un peu du confort utilisateur.
# Pour ce faire, retirez simplement la variable $highlight_ok dans le prochain [ REPLACE WITH ] et n'appliquez pas celui-ci.
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$highlight_ok = ($highlight !='') ? "&highlight=$highlight" : '';
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ FIND ]------------------------------------------
#
'U_VIEW_TOPIC' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&start=$start&postdays=$post_days&postorder=$post_order&highlight=$highlight"),
#
#-----[ REPLACE WITH ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
'U_VIEW_TOPIC' => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&start=$start&postdays=$post_days&postorder=$post_order$highlight_ok"),
// www.phpBB-SEO.com SEO TOOLKIT END |
|
_________________ macnack |
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
Silverado05
Joined: 01 Jul 2006 Posts: 34 Location: Texas
|
Posted: Tue Aug 01, 2006 10:15 pm Post subject: Re: [Archive] phpBB SEO Simple mod Rewrite V 0.0.2 |
|
|
| dcz wrote: | First you don't need to start twice the rewrite engine. As well, the mx sitemaps rules need the full path for this .htaccess located on level above in the root folder. And there should not be any rewriterules in the forum/ folder any more.
|
I tried it in both the forum .htaccess and the .htaccess in the root and it still doesn't work. Where should it be, in the root or the forum?
The index is pointing to where it is because of the the previous rewrite mod.
Their is no way I can make it work with the one I had installed? |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Tue Aug 01, 2006 10:24 pm Post subject: Re: [Archive] phpBB SEO Simple mod Rewrite V 0.0.2 |
|
|
| Silverado05 wrote: |
Their is no way I can make it work with the one I had installed? |
Well, the two sitemaps module do support more than the phpBB SEO mod rewrites, but you cannot mix two different ones.
You can though, simply mod this one to use different static terms ("forum", "topic", "post" & "member"), but you'd have to take care about making sure the same changes are made everywhere on your site.
Then, I see you installed the mod properly, at least this time I can see rewritten links in the topic and search result pages, but they do not work.
This means it's the .htaccess.
It should be located in the root folder. Make sure the file transfer is correct and if it still does not work, try getting rid of all "/" in front of "forum/" ("/forum/" => "forum/") in the rewriterules.
and it should work, at least if mod_rewrite is loaded.
++ |
_________________ 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 |
|
 |
Silverado05
Joined: 01 Jul 2006 Posts: 34 Location: Texas
|
Posted: Tue Aug 01, 2006 10:36 pm Post subject: Re: [Archive] phpBB SEO Simple mod Rewrite V 0.0.2 |
|
|
I was refrring to why couldn't I use the URL rewrite that I had that was working to work with the topic anywhere?
I made the changes in the .htacess in the root but still getting 404. Do I need to delete the .htaccess that is in the forum dir?
The first code is from my Joomla CMS, the forum rules are at the bottom.
| Code: | ##
# @version $Id: htaccess.txt 4085 2006-06-21 16:03:54Z stingrey $
# @package Joomla
# @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##
#####################################################
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
#
# Only use one of the two SEF sections that follow. Lines that can be uncommented
# (and thus used) have only one #. Lines with two #'s should not be uncommented
# In the section that you don't use, all lines should start with #
#
# For Standard SEF, use the standard SEF section. You can comment out
# all of the RewriteCond lines and reduce your server's load if you
# don't have directories in your root named 'component' or 'content'
#
# If you are using a 3rd Party SEF or the Core SEF solution
# uncomment all of the lines in the '3rd Party or Core SEF' section
#
#####################################################
##### SOLVING PROBLEMS WITH COMPONENT URL's that don't work #####
# SPECIAL NOTE FOR SMF USERS WHEN SMF IS INTEGRATED AND BRIDGED
# OR ANY SITUATION WHERE A COMPONENT's URL's AREN't WORKING
#
# In both the 'Standard SEF', and '3rd Party or Core SEF' sections the line:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# May need to be uncommented. If you are running your Joomla/Mambo from
# a subdirectory the name of the subdirectory will need to be inserted into this
# line. For example, if your Joomla/Mambo is in a subdirectory called '/test/',
# change this:
# RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
# to this:
# RewriteCond %{REQUEST_URI} ^(/test/component/option,com) [NC,OR] ##optional - see notes##
#
#####################################################
## Can be commented out if causes errors, see notes above.
# Options FollowSymLinks
#
# mod_rewrite in use
RewriteEngine On
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla/MamboDirectory (just / for root)
RewriteBase /
########## Begin - Joomla! core SEF Section
############# Use this section if using ONLY Joomla! core SEF
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteRule ^(content/|component/) index.php
#
########## End - Joomla! core SEF Section
########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section
#########################################################
# PHPBB SEO REWRITE RULES #
#########################################################
# AUTHOR : DCZ http://www.phpbb-seo.com/
# STARTED : 01/2006
#####################################################
# FORUMS PAGES
########################
# CATEGORIES
RewriteRule ^forum/cat([0-9]+)\.html$ forum/index.php?c=$1 [QSA,L]
# PAGINATED FORUM
RewriteRule ^forum([0-9]+)-([0-9]+)\.html$ forum/viewforum.php?f=$1&start=$2 [QSA,L]
# FORUM
RewriteRule ^forum([0-9]+)\.html$ forum/viewforum.php?f=$1 [QSA,L]
# PAGINATED TOPIC
RewriteRule ^forum/topic([0-9]+)-([0-9]+)\.html$ forum/viewtopic.php?t=$1&start=$2 [QSA,L]
# TOPIC
RewriteRule ^forum/topic([0-9]+)\.html$ forum/viewtopic.php?t=$1 [QSA,L]
# POST
RewriteRule ^forum/post([0-9]+)\.html$ forum/viewtopic.php?p=$1 [QSA,L]
#PROFILES
RewriteRule ^forum/member([0-9]+)\.html$ forum/profile.php?mode=viewprofile&u=$1 [QSA,L]
# END PHPBB PAGES
#####################################################
RewriteRule ^forum/sitemaps([0-9]+)\.html$ /forum/sitemaps.php?c=$1 [QSA,L]
RewriteRule ^forum/sitemaps\.html$ /forum/sitemaps.php [QSA,L]
RewriteRule ^forum/forum-m\ap\.html$ /forum/sitemaps.php?fim [QSA,L]
RewriteRule ^forum/forum-m\ap-([0-9]+)-([0-9]+)\.html$ /forum/sitemaps.php?fmp=$1&start=$2 [QSA,L]
RewriteRule ^forum/forum-m\ap-([0-9]+)\.html$ /forum/sitemaps.php?fmp=$1 [QSA,L]
|
|
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
Silverado05
Joined: 01 Jul 2006 Posts: 34 Location: Texas
|
Posted: Tue Aug 01, 2006 11:14 pm Post subject: Re: [Archive] phpBB SEO Simple mod Rewrite V 0.0.2 |
|
|
| dcz wrote: | Try moving it all to the root.
we'll have to adapt the Joomla part, but it will be easier to deal with all those from just one place at least at first.
For the Joomla part try adding the path to :
| Code: | | RewriteRule ^forum/(content/|component/) index.php |
and it should work.
++ |
It is all in the root now and it isn't working.
My phpBB isn't intergrated into Joomla. They are two seperate installations. I have the Joomla in the root and the forum in a sub-dir name forum. Is the line above still needed?
Do I need to delete the .htaccess file that is in the forum folder?
-Thanks |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
Posted: Tue Aug 01, 2006 11:23 pm Post subject: Re: [Archive] phpBB SEO Simple mod Rewrite V 0.0.2 |
|
|
| Silverado05 wrote: |
Do I need to delete the .htaccess file that is in the forum folder?
-Thanks |
Yes. Just one .htacccess with rewriterules is the goal here.
Rewriterules and apache mod rewrite do not care about joomla or phpbb, they just deal with URLs and redirections. Moving the rules won't change anything as soon as they'll work
While testing, make sure to check joomla's URLs as well.
++ |
_________________ 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 |
|
 |
Silverado05
Joined: 01 Jul 2006 Posts: 34 Location: Texas
|
Posted: Tue Aug 01, 2006 11:28 pm Post subject: Re: [Archive] phpBB SEO Simple mod Rewrite V 0.0.2 |
|
|
Ok where exactly in the .htaccess file do I place?
| Code: | | RewriteRule ^forum/(content/|component/) index.php |
-Thanks |
|
|
| Back to top |
|
 |
dcz Administrateur - Site Admin

Joined: 28 Apr 2006 Posts: 13354
|
|
| Back to top |
|
 |
|
|
| Navigation |
Similar Topics |
|
|
|
|
|
|
|