- Title : phpBB SEO Ultimate SEO URL
- Author : dcz / http://www.phpbb-seo.com
- Description : This mod will URL rewrite phpBB URLs in various manners, injecting, or not, forums and topic titles in their URLS, each URL being rewritten once, no matter the number of links using it on the page.
- Version : 0.6.4
- Installation Level : Advanced.
- Installation Time : 20 min.
- Automod: n/a
- phpBB : 3.0.7
Author's Notes :
- Before you do anything :
- Please read phpBB SEO Ultimate SEO URL Presentation carefully, you will save time and will not risk to jeopardise your web-site's PageRanking.
Starting from v0.6.0, the three phpBB SEO mod rewrites are merged into a single mod, the phpBB SEO Ultimate SEO URL mod.
Each one of the previous mods has now become a mode of the phpBB SEO Ultimate SEO URL mod. You can just choose which mode to use in the ACP.
Version 0.6.0 as well introduces a new powerful option : SQL Rewriting. You will now be able to chose topic URL on a per case basis, no matter the URL standard used. This make the mixed mode with virtual folder option more powerful than ever, since you can keep static URL for most cases and use selected keywords for the more important threads.
Enabling this option is optional, but even if you do not intend to set custom URLs for your threads, it still makes the rewriting process faster than ever. Turning on the SQL rewriting option will not change your topic URLs, it will only allow admins and moderators (of the concerned thread's forum) to do it on a per case basis while posting and editing topic first post.
The phpbb_seo class was completely rewrote, all three types of URL rewriting are now merged without performance loss, if not with better performance even without the SQL rewriting option activated.
This mod requires running Apache Server with mod_Rewrite module loaded, or IIS server running isapi_rewrite.
This mod is fully working with phpBB vanilla (unmodded), special patches may be required for some mods.
You should think about which url rewriting mode will best fit your forum project before you go online with this mod. - With this mod, phpBB URL will transformed this way :
- viewforum.php?f=xx
- forum-title-fxx.html (by default),
- any-keywords-fxx/ (optional),
- any-keywords/ (optional),
- forumxx.html (optional),
- forumxx/(optional)
- viewforum.php?f=xx&start=yy
- any-keywords-fxx-yy.html (by default),
- any-keywords-fxx/pageyy.html (optional),
- any-keywords/pageyy.html (optional),
- forumxx-yy.html (optional),
- forumxx/pageyy.html(optional)
- viewtopic.php?f=xx&t=yy
- topicyy.html (by default)
- topic-title-tyy.html (optional),
- any-keywords-tyy.html (optional),
- any-keywords-fxx/topicyy.html (optional),
- any-keywords-fxx/topic-title-tyy.html (optional),
- any-keywords-fxx/any-keywords-tyy.html (optional),
- any-keywords/topicyy.html (optional),
- any-keywords/topic-title-tyy.html (optional)
- any-keywords/any-keywords-tyy.html (optional)
- viewtopic.php?f=xx&t=yy&start=zz
- topicyy-zz.html (by default)
- topic-title-tyy-zz.html (optional),
- any-keywords-tyy-zz.html (optional),
- any-keywords-fxx/topicyy-zz.html (optional),
- any-keywords-fxx/topic-title-tyy-zz.html (optional),
- any-keywords-fxx/any-keywords-tyy-zz.html (optional),
- any-keywords/topicyy-zz.html (optional),
- any-keywords/topic-title-tyy-zz.html (optional)
- any-keywords/any-keywords-tyy-zz.html (optional)
- viewtopic.php?p=xx
- postxx.html (by default)
- topic-title-tyy(-zz).html#pxx (and all combination of settings for topics, with the no duplicate mod)
- download/file.php?id=xx(&t=1)
- resources/file-title/(thumb/)xx (optional)
- memberlist.php?mode=viewprofile&u=xx
memberlist.php?mode=viewprofile&un=nickname (if possible)- memberxx.html (by default)
- nickname-uxx.html (optional),
- nickname-uxx/ (optional),
- member/nickname (optional)
- memberlist.php?mode=group&g=xx
- groupxx.html (by default)
- groupe-name-gxx.html (optional)
- memberlist.php?mode=group&g=xx&start=yy
- groupxx-yy.html (by default)
- groupe-name-gxx-yy.html (optional),
- groupxx/pageyy.html (optional)
- groupe-name-gxx/pageyy.html (optional)
- memberlist.php?mode=leaders
- the-team.html (by default)
- search.php?author_id=xx&sr=post|topics
search_id=egosearch
search.php?author=nickname&sr=post|topics (if possible)- memberxx-posts|topics.html (optional),
- memberxx/posts|topics/ (optional),
- nickname-uxx-posts|topics.html (optional),
- nickname-uxx/posts|topics/ (optional),
- member/nickname/posts|topics/ (optional).
- search.php?author_id=xx&sr=post|topics&start=yy
search.php?author=nickname&sr=post|topics&start=yy(if possible)- memberxx-posts|topics-yy.html (optional),
- memberxx/posts|topics/pageyy.html (optional),
- nickname-uxx-posts|topics-yy.html (optional),
- nickname-uxx/posts|topics/pageyy.html (optional),
- member/nickname/posts|topics/pageyy.html (optional).
- search_id=active_topics
- active-topics.html
- search_id=active_topics&start=xx
- active-topics-xx.html
- search_id=unanswered&sr=topics
- unanswered.html
- search_id=unanswered&start=xx&sr=topics
- unanswered-xx.html
- search_id=newposts&sr=topics
- newposts.html
- search_id=newposts&start=xx&sr=topics
- newposts-xx.html
- search_id=unreadposts
- unreadposts.html
- search_id=unreadposts&start=xx
- unreadposts-xx.html
- If the virtual folder is turned on, global announces will be treated in a separate virtual folder :
- viewtopic.php?f=xx&t=yy
- announces/announces-title-tyy.html
- viewtopic.php?f=xx&t=yy&start=zz
- announces/announces-title-tyy-zz.html
- viewtopic.php?f=xx&t=yy
- viewforum.php?f=xx
- It will not output any pagination duplicates.
URL rewriting is performed without using ob_start() and does not add any SQL.
The process is optimized, titles and URLs are formatted once, even if the url is called many times. - Short URL feature : Anything in topic title between "[" and "]" won't be injected in URL.
Example :
This topic title : "[SOMETHING] The Topic Title" will correspond to this URL : "the-topic-title-txx.html" - Bad Title handling : Example :
This topic title : """"??Véry bâd tïtle handling"[hehe]!!!" will correspond to this URL : "very-bad-title-handling-txx.html" - SQL Rewriting :
You will be able to activate the SQL Rewriting option which will allow you to set custom url for your topics on a per case basis.Example :
topicxx.html and topic-title-txx.html will be modifiable to any-keyword-I-want-txx.html
This mod is and will be compatible to all phpBB SEO modules for phpBB, specific install instructions may apply.
- Please read phpBB SEO Ultimate SEO URL Presentation carefully, you will save time and will not risk to jeopardise your web-site's PageRanking.
- Performances
This mod is the fastest ever written by phpBB SEO. It's using two levels of cache :- One in the RAM for almost all URLs passing through the phpbb_seo class. It can save up to couple hundred calls to the rewriting functions (viewforum.php).
- One in a file, for forum URLs. It saves calls to the format_url() method and as well allows us to take full control over the forum URLs and dissociate the URLs from forum titles.
And better, the rewriting process does not really depend on the server load. The follwoing benchmark was performed without SQL rewriting, just know that you will save all title formatting when using it
CPU @ 100% :- Code: Select all
Time : 0.314s | 13 Queries | GZIP : Off
Seo : 0.01043 s ( 3.32 % ) - 27 Titles ( 6.28 % ) - 96 URLs rewritten ( 67.94 % ) - 218 URLs cached (25.78 % - saved 0.0161 s) | Explain
CPU @ 0% :- Code: Select all
Time : 0.107s | 13 Queries | GZIP : Off
Seo : 0.01032 s ( 9.62 % ) - 27 Titles ( 6.09 % ) - 96 URLs rewritten ( 68.39 % ) - 218 URLs cached (25.52 % - saved 0.0160 s) | Explain
- Settings
This mod is fully configurable in phpBB ACP.

You will be able to set up the various phpBB SEO class features such as :- Activate URL rewriting (optional) : You can activate and deactivate URL rewriting on all the forum.
- Choose URL rewriting type (optional) : You have here the choice between three phpBB SEO mod rewrite types.
The Simple one,the Mixed one and the Advanced one. - Activate SQL Rewriting (optional) : This option will allow you to choose url for each topic. You will be able to accurately set topic url when posting new topic or when editing an existing one. This functionality is though limited to forum admins and moderators.
The feature also has the great advantage to fasten the url rewriting by a lot, especially when using the virtual folder option in advanced mode, and to make it a lot easier to retrieve rewritten urls from any page. - Profiles and groups injection (optional) : You can here choose to inject nicknames group names and user message page (optional see below) in their URLs instead of the default static rewriting.
- Virtual folder Profiles (optional) : You can choose to simulate a folder structure for profiles and user messages page (optional see below) URLs, phpBB/nickname-uxx/(topics/)[b] or [b]phpBB/memberxx/(topics/)[b] instead of [b]phpBB/nickname-uxx(-topics).html[b] and [b]phpBB/memberxx(-topics).html[b].
- Profiles ID removing (optional) : When Profiles and groups injection is activated, you can here chose to use [b]example.com/phpBB/member/nickname instead of the default example.com/phpBB/nickname-uxx.html. Please read the install for browser limitation and urlencoding issues raised by this option.
- Common Search and User messages pages rewriting (optional) : User messages pages URLs can be rewritten as well as such as active topics, unanswered and newposts pages. The URL rewriting type (with and without ID) follows the one set for profiles and groups.
phpBB/messages/nickname/topics/ VS phpBB/nickname-uxx-topics.html VS phpBB/memberxx-topics.html.
ID removing on these links will imply the same limitation as per the user profiles. - Attachment Rewriting (optional) : Attached files URL can be rewritten using this option. The rewriting will inject the first line of the eventual file description in the file url.
- SID Removing (optional) : SID will be removed from 100% of the URLs passing through the phpbb_seo class, for guests thus bots.
This ensure bots won't see any SID on forum, topic and post URLs, but visitors that do not accept cookies will most likely create more than one session. - Highlights Removing (optional) : Highlights will be removed from 100% of the URLs passing through the phpbb_seo class, for guests thus bots.
This ensure bots won\t see any Highlights on forum, topic and post URLs.
The Zero duplicate will automatically follow this setting, eg http 301 redirect url with highlights for guest and bots if set to Yes. - Small words filtering (optional) : Words composed of less than three letters won't be used in URLs.
Example : this-is-a-topic-title-txx.html VS this-topic-title-txx.html for a topic URL - Virtual folder (optional) : Forum URLs can be treated as virtual folders and optionally be used in the topics URLs.
Example :topic-title-txx.html vs forum-url-fxx/topic-title-txx.html for a topic URL. - Virtual Root (optional) : If phpBB is installed in a sud folder (example phpBB/), you can simulate a root install for rewritten links.
Example :phpBB/forum-title-fxx/topic-title-txx.html VS forum-title-fxx/topic-title-txx.html for a topic URL.
This can be handy to shorten URLs a bit, especially if you are using the "Virtual Folder" feature. UnRewritten links will continue to appear and work in the phpBB folder. - Forum URL caching (optional) : Turns on the cache for forum URLs and allow to separate forum titles from their URL.
Example :forum-title-fxx/ VS any-keywords-fxx/ for a forum URL. - Forum ID Removing (optional) : Get rid of the IDs and delimiters in forum URLs. Only apply if Forum URL caching is activated.
Example :any-keywords-fxx/ VS any-keywords/ for a forum URL.
- Once you will have set up the above options, you will be able to generate a personalized .htaccess within no time.
- You will be able to dissociate Forum URLs from their titles and elect to use whatever keyword you may like in them.
- You will be able to dissociate topic URLs from their titles and elect to use whatever keyword you may like in them.
- The mod comes with options to open, or not, external inks in new window / tab, you can as well define css classes that will activate the new window opening.
- Activate URL rewriting (optional) :
- Char-sets and title injection
phpBB uses UTF-8 as final encoding, and this should be enough to handle all cases.
UTF-8 is fully supported by this mod.
This mod rewrite will only inject the ASCII Chars ( after removing all accents ) available in the titles.
For example : "نرم افزار - Software niño" will be formated prior to injection in the following way : "software-nino".
The phpbb_seo class handles de-accentuation for most of the occidental characters, but you could need to handle more cases for your project.
Starting from v0.6.0, we introduced a simple way to set up custom replacements.Example :
In phpbb_seo/includes/setup_phpbb_seo.php, you could add :- Code: Select all
$this->url_replace = array(
// Purely cosmetic replace
'$' => 'dollar', '€' => 'euro',
"'s" => 's', // it's => its / mary's => marys ...
// Language specific replace (German example)
'ß' => 'ss',
'Ä' => 'Ae', 'ä' => 'ae',
'Ö' => 'Oe', 'ö' => 'oe',
'Ü' => 'Ue', 'ü' => 'ue',
);
Before :- Code: Select all
// Let's make sure that settings are consistent
$this->check_config();
To implement custom replacment, language specific (here with the German language example) and / or cosmetic (here for $, € and words ending with 's).
Just make sure that the characters you may add are not already handled properly but the default replacements before you add some more.
And please note that English characters are already properly handled. - Migrating :
If you are migrating, eg if your forum is already indexed using different URLs, you'll have to use another robots.txt and install the zero duplicate.
The migrating procedure will allow you to migrate and keep your previously indexed pages. Older links will be HTTP 301 redirected to the new ones. It is rather simple, but the solution depends on cases.
Let's meet in the phpBB mod Rewrite forum. - The robots.txt :
The robots.txt file must be uploaded in your domain's root folder.
You must obviously replace phpbb/ with your real phpBB installation folder (or with nothing if it's installed in the root).- Code: Select all
User-agent: *
Disallow: /phpbb/viewtopic.php
Disallow: /phpbb/viewforum.php
Disallow: /phpbb/index.php?
Disallow: /phpbb/posting.php
Disallow: /phpbb/search.php?
Disallow: /phpbb/ucp.php
Disallow: /phpbb/mcp.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: Select all
Disallow: /phpbb/member
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.
Warning :- In case you are migrating from a previous unrewritten phpBB version, wait couple month after you activate the zero duplicate mod before you implement the robots.txt. In such case we want to redirect first and then drop useless content.
- Some advices :
Once you will have installed the mod, you will have to empty the phpBB/cache/ folder before the mod will fully work, just delete all files but the .htaccess.
Don't forget about your robots.txt as well as about the www prefix issue.
The phpBB SEO Zero Duplicate as well as some other good mods (dynamic meta tag, Otpimal titles, No duplicate ...) that will help you out a lot in this SEO quest are to be found in the phpBB SEO toolkit Forum.
The GYM sitemaps & RSS module is now available.
You can as well check 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
Our advice goes to Xampp to set up a local test server.
You will find a full tutorial here : How to set up a local server using xampp
To load mod Rewrite with Xampp :Open <xampp-directory>/apache/conf/httpd.conf and replace :- Code: Select all
#LoadModule rewrite_module modules/mod_rewrite.so
With :- Code: Select all
LoadModule rewrite_module modules/mod_rewrite.so
And then :- Code: Select all
<Directory />
Options FollowSymLinks
AllowOverride none
Order deny,allow
Deny from all
</Directory>
With :- Code: Select all
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
</Directory>
Languages :
- English, French.
- French support thread
Demo :
Premod :
- This mod is included in the phpBB SEO Premod
Download:

English |
French
News
