Ultimate SEO URLs phpBB3 ( 1)
:

(- , ) :
.

- viewforum.php?f=3 => /imeto-na-foruma-f3.html
- viewtopic.php?f=3&t=3 => /imeto-na-temata-t3.html
- memberlist.php?mode=viewprofile&u=3 => /imeto-na-user-a-u3.html
- memberlist.php?mode=leaders => /the-team.html
- .
- search.php?author_id=xx&sr=post|topics => /imeto-na-user-a-u3-posts/topics.html
- download/file.php?id=xx => recources/file/xx

.


: Simple , Mixed & Advanced Mods.

: 3.0.5 , " " . :)


: http://forum.hahh.info
: ..

:

Download: http://sites.google.com/site/hahfiles/phpBB_SEO_Ultimate_SEO_URLV0-6-0.zip
Mirror 1: http://dox.bg/files/dw?a=630a017ce1
Mirror 2: http://www.megaupload.com/?d=IW72MKXW
Mirror 3: http://www.mediafire.com/?lnfnhrp3ict


root .
root contrib\phpBB_3.0.5_modified_files\root .

:

:
________________________________________
:
=>
1) backup .
2) , .
3) .
4) CHMOD 777 phpbb_seo/cache/
5) phpBB/cache/ .htaccess-.
6) vashiqt-sait.com/forum/phpbb_seo/phpbb_seo_install.php .
7) : , .
8) .htaccess .
9) , vashiqt-sait.com/forum/post1.html 404 , 8.
10) Rewrite URL . . :)
________________________________________

, .
(ACP => STYLE, Themes => Refresh).

.htaccess , , PHPBB SEO .htaccess , , .htaccess , .





##############################################################
## MOD Title: phpBB SEO Ultimate SEO URL
## MOD Author: dcz / www.phpbb-seo.com
## MOD Description: , url- .
## Advanced, Mixed Simple .
## , .
## http://www.phpbb-seo.com/en/phpbb-mod-rewrite/ultimate-seo-url-t4608.html
## .
##
## MOD : 0.6.0
##
## :
## : ~40 ( ..)
## : 24
## common.php,
## includes/db/dbal.php,
## includes/functions.php,
## includes/functions_content.php,
## includes/functions_display.php,
## includes/functions_posting.php,
## index.php,
## language/en/acp/common.php,
## memberlist.php,
## posting.php,
## search.php,
## styles/prosilver/template/attachment.html,
## styles/prosilver/template/forum_fn.js,
## styles/prosilver/template/overall_header.html,
## styles/prosilver/template/posting_editor.html,
## styles/prosilver/template/simple_header.html,
## styles/prosilver/template/viewtopic_body.html,
## styles/subsilver2/template/attachment.html,
## styles/subsilver2/template/overall_header.html,
## styles/subsilver2/template/posting_body.html,
## styles/subsilver2/template/simple_header.html,
## styles/subsilver2/template/viewtopic_body.html,
## viewforum.php,
## viewtopic.php
##
## : 10
## includes/acp/acp_phpbb_seo.php
## includes/acp/info/acp_phpbb_seo.php
## images/phpbb-seo.png
## language/en/acp/phpbb_seo.php
## phpbb_seo/docs/COPYING
## phpbb_seo/includes/.htaccess
## phpbb_seo/includes/setup_phpbb_seo.php
## phpbb_seo/phpbb_seo_class.php
## phpbb_seo/phpbb_seo_install.php
## phpbb_seo/sync_url.php
##
## : http://www.opensource.org/licenses/rpl.php Reciprocal Public License
##############################################################
## Author Notes:
## _____________
##
## This is the phpBB SEO Advanced mod_rewrite core.
## Please note that this version will not inject topic titles in post's URLS. This is to make it easier
## to disallow them with our robots.txt file, since these are duplicates any way.
##
## 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.
##
## You can insall the No Duplicate mod ( http://www.phpbb-seo.com/en/phpbb-seo-toolkit/phpbb3-seo-no-duplicate-t1225.html )
## if you want to replace post URL with their corresponding topic URL.
##
## This mod requires running Apache Server with mod_Rewrite module loaded, or IIS server running isapi_rewrite.
##
##
## :
##
## viewforum.php?f=xx => any-keywords-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/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/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)
##
## download/file.php?id=xx(&t=1) => resources/file-title/(thumb/)xx (optional)
##
## memberlist.php?mode=viewprofile&u=xx => memberxx.html (by default),
## memberlist.php?mode=viewprofile&un=nickname memberxx/ (by default),
## if possible 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 => memberxx-posts|topics.html (optional),
## search_id=egosearch memberxx/posts|topics/ (optional),
## search.php?author=nickname&sr=post|topics nickname-uxx-posts|topics.html (optional),
## if possible nickname-uxx/posts|topics/ (optional),
## member/nickname/posts|topics/ (optional)
##
## search.php?author_id=xx&sr=post|topics&start=yy => memberxx-posts|topics-yy.html (optional),
## search.php?author=nickname&sr=post|topics&start=yy memberxx/posts|topics/pageyy.html (optional),
## if possible 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,
##
## 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
##
## This mod has nothing in common with other phpBB mod rewrite, it will perform the URL rewriting
## without using ob_start() nor adding any SQL. It is thus faster and not messing anymore with Gun-Zip
## or with the html link format, and will not output any pagination duplicates.
##
## The process is optimized, titles and URLs are transformed once, even if the url is called and outputted many times.
##
## WARNING : Topic title injection in URL can be hard to deal with depending on the type of subjects your
## forum is about. In most cases phpBB SEO recommend the use of the phpBB SEO mixed mod Rewrite instead.
## 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.
##
##
## Char-sets :
## ___________
##
## phpBB3 uses UTF-8 as final encoding, and this should be enough to handle all cases.
## UTF-8 is fully supported by this mod.
## The mod rewrite will only inject the ASCII Chars ( after removing all accents ) available in the titles.
##
## For example : "[non ASCII chars] Software niño" will be formated this way prior to injection : "software-nino".
## It is still possible that some characters only having a decimal HTML/XML entity won't be handled properly at first.
## The method to filter these is simple, please ask for help in our forums.
##
## Migration :
## ___________
##
## If you are migration, 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 Advanced mod rewrite forum ( http://www.phpbb-seo.com/boards/advanced-seo-url-vf54/ ).
##
##
#### UPDATE
## 0.4.8 => 0.6.0 Update : Required changes to be found in contrib/0.4.8_0.6.0_Ultimate_Update.txt
## Previous updates are to be found in the contrib/old/ folder.
####
##
## 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 exceptions, please contact a phpBB SEO administrator (primarily SeO or dcz).
##
## Failure to comply will jeopardize support and developments.
##
##############################################################
## MOD History:
##
## 2009-06-08 - 0.6.0
## - Updated to comply with phpBB 3.0.5,
## - Complete rewrite of the phpbb_seo class, URL rewriting never was this fast,
## - Added : SQL Rewriting for topic urls, allowing per case URLs for each topics (optional),
## - Added : Attachment Rewriting (optional),
## - All types of URL rewritings are now merged into a single mod: Ultimate SEO URL.
## 2008-12-20 - 0.4.8
## - Updated to comply with phpBB 3.0.4,
## - Added : topic and forum url are now rewritten in notification emails,
## - Added : topic url in print view is now rewritten.
## 2008-11-20 - 0.4.6
## - Complete rewrite of the phpbb_seo::url_rewrite method,
## the phpbb_seo class is now path aware.
## - Fixed : global annoucement display when the lowest forum id is not public,
## - Fixed : possibly wrong forum id in active topic last posts links,
## - Many minor bug fixes and enhancements in phpbb_seo_class.php.
## 2008-07-14 - 0.4.4
## - Fixed the update bug caused by the empty phpbb_seo class,
## - Fixed pagination rewriterules for forum url without id and with a suffixe different that "/",
## - Fixed install script for no MYSQL DB,
## - Fixed search for word startting / ending with a,m or p,
## - Fixed various virtual root wrong links,
## - Various optimization in phpbb_seo_class.php
## 2008-04-14 - 0.4.2
## - Updated : User messages pages URLs structure,
## - Added : virtual folder option for user messages pages,
## - Added : copyright link formatting options,
## - Added : support for active_topics link,
## - Added : support for unanswered link,
## - Added : support for newposts link,
## - Added : support for egosearch link,
## - Added : support for most active topic link on profile view,
## - Fixed : group sort option links,
## - Fixed : unread link it topic view,
## - Fixed : Session tracking : Sessions tracking is now fully fixed for viewforum,
## but will only work with virtual folder trick in viewtopic,
## - Various optimizations in phpbb_seo_class.php and acp_phpbb_seo.php.
## 2007-12-18 - 0.4.0
## - Added : Group URL rewriting, with optional group name injection,
## - Added : profile URL can use nickname injection (optional),
## - Added : profile URL can use nickname injection without ID (optional),
## - Added : User messages URL can use nickname injection (optional),
## - Added : User messages URL can use nickname injection without ID (optional),
## - Added : 404 header is now returned for forums that do not exist (both rewritten and vanilla URLs),
## - Added : subsilver2 code changes,
## - Fixed : Usage of a slash as a suffix is now fully supported for all rewritten URLs,
## - Fixed : Base href handling (bug with virtual root option),
## - Fixed : 100% XHTML valid output,
## - Updated to comply with phpBB3.0.0.
## 2007-10-15 - 0.4.0RC4
## - Fixed JS jump to page script,
## - Updated to comply with phpBB3.0.RC7.
## 2007-09-15 - 0.4.0RC3
## - Enhanced the phpBB SEO ACP a bit,
## - Updated part of the code to take the other two versions into account.
## 2007-09-06 - 0.4.0RC2a
## - Fixed ACP bug with the zero duplicate,
## - Fixed typo in install.
## 2007-08-31 - 0.4.0RC2
## - Added phpBB3 acp module with installer,
## - Added an option to be able to turn on / off URL rewriting,
## - Updated the install to comply with phpBB3.0.RC5.
## 2007-08-10 - 0.4.0RC1
## - Added a custom pagination for when forum are treated as virtual folders,
## - Added a forum URLs cache and setting page,
## - Added a phpBB SEO mod rewrite setting page,
## - Added an .htaccess setup page,
## - Fixed small word filtering (thx pvchat1),
## - Fixed back to top link in viewtopic (thx GTT),
## - Fixed notification link redirection (thx Illuminati).
## 2007-07-29 - 0.2.0RC3
## - Updated to work with phpBB3 RC4 (no changes with phpBB3 RC3),
## - New option : To add or not the forum url in the topic ones,
## - New base href handling, now conditioned to the required files only,
## - Added rewriting of the return link while posting,
## - Added small words filtering using the fast preg_replace() method,
## - Optimized URL caching.
## 2007-06-27 - 0.2.0RC2a
## - Fixed last and newest post link in search view
## 2007-06-27 - 0.2.0RC2
## - Updated to work with phpBB3 RC2
## - Easier install, better virtual folder handling
## 2007-05-26 - 0.2.0RC1
## - First public Version
##
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################


#
#-----[ " " ]--------------------------------------------------
#
________________________________________
>>>> <<<<<
________________________________________

You will find the premodded phpBB 3.0.5 files in contrib/phpBB_3.0.5_modified_files/root/,
you can safely overwrite the phpBB 3.0.5 files with these and skip the file editing part of this install
if you did not modify these before you install this mod.
Additional language files modified by this mod are to be found in
contrib/phpBB_3.0.5_modified_files/translations/.

A phpBB 3.0.5 => ultimate mod rewrite 0.6.0 diff file is as well available in the
contrib/ directory of this release.

___________
:
________________________________________
:
=>
1) backup .
2) , .
3) .
4) CHMOD 777 phpbb_seo/cache/
5) phpBB/cache/ folder .htaccess-.
6) vashiqt-sait.com/forum/phpbb_seo/phpbb_seo_install.php .
7) : , .
8) .htaccess .
9) , vashiqt-sait.com/forum/post1.html 404 , 8.
10) Rewrite URL . . :)
________________________________________

, .
(ACP => STYLE, Themes => Refresh).

__________
Settings :
__________

The settings must be done before step 4 above for the generated .htaccess to be up to date.
Later modification will most likey require a new .htaccess as well as personalized redirections.

IMPORTANT :
A new option was added staring from v0.6.0 : SQL rewriting.

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.
Turning on this option will not change topic urls. Existing urls will be stored as they are displayed in the data
base.
But it may not be the case if you turn it off after you started to use it. In such case, personalized URLs may be
treated as if they weren't.
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.

If you start using this option after you updated from prior to 3.0.5, or if you are installing the premod over a
pre-existing phpBB install, you should run the phpbb_seo/sync_url.php script to update the data base (with topic urls).
Doing this will not change your URLs. If you do not run the script, topic urls will be updated in the data base each time
topics will be first visited.


=> By Default, this mod will get rid of index.php for phpBB's index.

You can change this in phpbb_seo/includes/setup_phpbb_seo.php if you prefer.
To do this, you can for example add :

$this->seo_static['index'] = 'forum';

before :

// Let's make sure that settings are consistent
$this->check_config();


This is mostly useful if you're running a portal in the folder where phpBB is installed.

=> The first setting to do is to select which static part to use in your URLs.

To do so, you can override default values in phpbb_seo/includes/setup_phpbb_seo.php, still before :

// Let's make sure that settings are consistent
$this->check_config();

EXAMPLES :
__________

// => the-team :
$this->seo_static['leaders'] = 'my-team'; // instead of the default "the-team"

// => announces :
$this->seo_static['global_announce'] = 'announcements'; // instead of the default "announces"

// => Active topics :
$this->seo_static['atopic'] = 'important-topics'; // instead of the default "active-topics"

// => Unaswered :
$this->seo_static['utopic'] = 'not-answered'; // instead of the default "unanswered"

// => Newposts :
$this->seo_static['npost'] = 'new-messages'; // instead of the default "newposts"

=> As well as for (and the same way) :
forum ($this->seo_static['forum']), topic ($this->seo_static['topic']), post ($this->seo_static['post']), member ($this->seo_static['member']), groups ($this->seo_static['group']), attachments virtual directory ($this->seo_static['file_index'], read the comments in the file for more attachments customizing) and virtual folder pagination ($this->seo_static['page'])

________________________________________________________________________________________________________


=> And the suffixes too, if you do not like .html, using the phpbb_seo::seo_ext array ($this->seo_ext) still before :

// Let's make sure that settings are consistent
$this->check_config();

EXAMPLES :
__________
$this->seo_ext['forum'] = '.htm';
$this->seo_ext['topic' => '/';

PLEASE NOTE :
_____________
Suffixes may not be ".php" or empty, if you set a suffix to "/", it will automatically activate the pagexx.html pagination.

Once set, these settings will be taken into account while generating the .htaccess.

________________________________________________________________________________________________________


=> Other options are configurable on the setting page (step 7 of the above list).
Go to the "phpBB SEO Class Settings" page, and take your time to set up the class as you wish.

=> It is now time to play with your forum URLs.
To do so, go to the "Forum URL management" page and start selecting good keywords for your forum URLs.
Take your time to do it, and remember that using the remove IDs option in the settings makes it a bit harder to build appropriate redirection, in case you edit the forum URLs later.
If you later create more forums, you'll just have to go to this page again an eventually update the
new forum URL.
If not, the new forum URL will not be cached and the default one will be used (forum-title-fxx).

________________________________________
Custom replacement for title injection :
________________________________________

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.
This is useful for special characters not properly handled by default, such as Russian ones (&#191; => G), or to implement custom replacements such as $ => dollar.
It works with any string, but you MUST perform the edits with an UTF-8 (without BOM) capable text editor.
This is still done in phpbb_seo/includes/setup_phpbb_seo.php, and still before :

// Let's make sure that settings are consistent
$this->check_config();

The principle is simple, you can set up your custom replacement by filling the phpbb_seo::url_replace array ($this->url_replace).
The pattern to use is :

$this->url_replace = array(
'character(s) to find' => 'replacement to apply',
);

EXAMPLE :
_________

$this->url_replace = array(
// Purely cosmetic replace
'$' => 'dollar', '&#191;' => 'euro',
'\'s' => 's', // it's => its / mary's => marys ...
// Language specific replace (German example)
'&#223;' => 'ss',
'&#196;' => 'Ae', '&#228;' => 'ae',
'&#214;' => 'Oe', '&#246;' => 'oe',
'&#220;' => 'Ue', '&#252;' => 'ue',
);

Just make sure that the characters you may add are not already handled properly but the default replacements before you add some more.
Please note that English characters are already properly handled.

___________
NOTE: Cache
___________
The cache files are in the phpbb_seo_/cache/ folder.
phpbb_cache.php is the cached file containing both your settings and forum URLs.

The mod always creates a backups of the current cached file :
=> phpbb_cache.php.current is a copy of the phpbb_cache.php file.
It will automatically be used in case phpbb_cache.php is deleted or corrupted (which should not occur but).
=> phpbb_cache.php.old is a copy of the previous settings you had set, before the last update you performed.

You should backup these file when you update them, they are as crucial as you data base for your forum
since they are required for your forum URL to work properly.
So relax, this is just a basic precaution, you should not have trouble with these,
but never is better, hence the backup.

_________________
NOTE: .htaccess :
_________________

On the phpBB SEO ACP module, go to the ".htaccess" page.
A personalised .htaccess will be generated. It's the first one to consider trying.
You will have too put it where the red bolded messages of the .htaccess generator tells you to.
If you cannot find the location mentioned, it means that you did not properly set your phpBB server settings in the ACP.
If the default suggestion does not work, you will be to try more options, and generate several alternative.
You'll find an empty .htaccess file in this mod's archive contrib/ folder, you can use it to paste the .htaccess content generated on the htaccess page or save it directly on the server (saved .htaccess will be found in the phpbb/cache/ directory).

The .htaccess generator will add the required rewriterules to make your domain canonical, but they will be
left commented (un-active) at first, as this is the kind of thing that require human attention.
Please take a look at : http://www.phpbb-seo.com/en/seo-techniques/locking-the-www-in-urls-t30.html
to find out how to lock the use (or non use) of the www prefix in your domain's url.
This is a major Search Engine Optimisation issue to take care of the www prefix issue.

__________________
NOTE: robots.txt :
__________________

You will find a sample robots.txt file in the contrib/ folder of this package.
The robots.txt file must be uploaded in your domain's root folder (can be different from the phpBB one).
You must obviously replace phpbb/ with your real phpBB installation folder (or with nothing if it's installed in the domain's root).

IMPORTANT :
If your forum previously was indexed with the natural urls (viewtopic.php etc...), then you must make sure
that the robots.txt advised for our mod rewrite is not installed, if so DELETE it from the server.
This because we want to redirect old urls before we disallow them, it's CRUCIAL!
In such case, at least two after you activated the zero duplicate, you can safely implement the robots.txt.

__________________________________________________
NOTE: profile and user messages pages ID removing:
__________________________________________________

phpBB/member/nicknames VS phpBB/nicknames-uxx.html

If you use profile and / or user messages pages ID removing, you should know that a custom urlencode
will be used to circumvent a bug with mod_rewrite.
This imply that some chars like "&", "/", "#" and spaces will always be double encoded.
For example a user named rock&roll will require rock%2526roll (double urlencoded &) to be usable.
( http://www.php.net/urlencode => http://issues.apache.org/bugzilla/show_bug.cgi?id=34602 )

There are other issues with custom characters, like accents, which will add some urlencoded chars in urls.
It's not an SEO issue, since bots knows about urlencoding, but it can end up building pretty long url with multi byte characters.
This does not concern the a-zA-Z0-9 chars, underscore ("_"), hyphen ("-") and dot (".") included.
In phpbb_seo/phpbb_seo_class.php, you will no longer see different methods.

This of course means that the ID removing on profile and user messages pages is more comfy and universally efficient
to use with alphanumeric chars user names (without accents).

If you only allow alphanumeric chars for your user nicknames, then you can make the injection process faster by adding :

return $url;

right after :

function seo_url_encode( $url ) {

Remember that keeping the ID here will always work and that you still can simulate a folder structure for user messages pages.

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

root/*.* ---/*.*

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

common.php

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

// Grab global variables, re-cache if necessary
$config = $cache->obtain_config();

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if (empty($phpbb_seo) ) {
require_once($phpbb_root_path . 'phpbb_seo/phpbb_seo_class.'.$phpEx);
$phpbb_seo = new phpbb_seo();
}
// www.phpBB-SEO.com SEO TOOLKIT END

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

includes/db/dbal.php

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

function sql_report($mode, $query = '')
{
global $cache, $starttime, $phpbb_root_path, $user;

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
// www.phpBB-SEO.com SEO TOOLKIT END

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

<link href="' . $phpbb_root_path . 'adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />

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

<link href="' . $phpbb_seo->seo_path['phpbb_url'] . 'adm/style/admin.css" rel="stylesheet" type="text/css" media="screen" />

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

includes/functions.php

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

function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = false, $tpl_prefix = '')
{
global $template, $user;

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo, $phpEx;
// www.phpBB-SEO.com SEO TOOLKIT END

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

$template->assign_vars(array(
$tpl_prefix . 'BASE_URL' => $base_url,
'A_' . $tpl_prefix . 'BASE_URL' => addslashes($base_url),
$tpl_prefix . 'PER_PAGE' => $per_page,

$tpl_prefix . 'PREVIOUS_PAGE' => ($on_page == 1) ? '' : $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page),
$tpl_prefix . 'NEXT_PAGE' => ($on_page == $total_pages) ? '' : $base_url . "{$url_delim}start=" . ($on_page * $per_page),
$tpl_prefix . 'TOTAL_PAGES' => $total_pages,
));

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$prev = ($on_page == 1) ? '' : $base_url . "{$url_delim}start=" . (($on_page - 2) * $per_page);
$next = ($on_page == $total_pages) ? '' : $base_url . "{$url_delim}start=" . ($on_page * $per_page);
if (!empty($phpbb_seo->seo_opt['url_rewrite'])) {
static $pagin_find = array();
static $pagin_replace = array();
static $prev_find = array();
if (empty($pagin_replace)) {
$pagin_find = array('`(\.(?!' . $phpEx . ')[a-z0-9]+)([\w\#$%&~\-;:=,?@+]*)(&|\?)start=([0-9]+)`i', '`/([\w\#$%&~\-;:=,?@+]*)(&|\?)start=([0-9]+)`i' );
$pagin_replace = array( $phpbb_seo->seo_delim['start'] . '\\4\\1\\2', '/' . $phpbb_seo->seo_static['pagination'] . '\\3' . $phpbb_seo->seo_ext['pagination'] . '\\1' );
$prev_find = array($phpbb_seo->seo_delim['start'] . '0', $phpbb_seo->seo_static['pagination'] . '0' . $phpbb_seo->seo_ext['pagination']);
}
$page_string = str_replace($url_delim . 'start=0', '', $page_string);
$page_string = preg_replace($pagin_find, $pagin_replace, $page_string);
$prev = preg_replace($pagin_find, $pagin_replace, $prev);
$prev = str_replace($prev_find, '', $prev);
$next = preg_replace( $pagin_find, $pagin_replace, $next);
}
$template->assign_vars(array(
$tpl_prefix . 'BASE_URL' => $base_url,
'A_' . $tpl_prefix . 'BASE_URL' => addslashes($base_url),
$tpl_prefix . 'PER_PAGE' => $per_page,
$tpl_prefix . 'PREVIOUS_PAGE' => $prev,
$tpl_prefix . 'NEXT_PAGE' => $next,
$tpl_prefix . 'TOTAL_PAGES' => $total_pages)
);
// www.phpBB-SEO.com SEO TOOLKIT END

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

function append_sid($url, $params = false, $is_amp = true, $session_id = false)
{
global $_SID, $_EXTRA_URL, $phpbb_hook;

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
// We bypass the hook function here, the same effect as a standalone hook, which we want, but faster ;-)
global $phpbb_seo;
if (!empty($phpbb_seo->seo_opt['url_rewrite'])) {
return $phpbb_seo->url_rewrite($url, $params, $is_amp, $session_id);
} else
// www.phpBB-SEO.com SEO TOOLKIT END

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

return $phpbb_root_path . str_replace('&', '&', $redirect);

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$redirect = (preg_match('`^https?://`i', $redirect) ? '' : $phpbb_root_path) . trim(str_replace('&', '&', $redirect), '? ');
return reapply_sid($redirect);
// www.phpBB-SEO.com SEO TOOLKIT END

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

function page_header($page_title = '', $display_online_list = true)
{
global $db, $config, $template, $SID, $_SID, $user, $auth, $phpEx, $phpbb_root_path;

if (defined('HEADER_INC'))
{
return;
}

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
$template->assign_vars( array( 'PHPBB_FULL_URL' => $phpbb_seo->seo_path['phpbb_url'],
'SEO_BASE_HREF' => $phpbb_seo->seo_opt['seo_base_href'],
'SEO_START_DELIM' => $phpbb_seo->seo_delim['start'],
'SEO_SATIC_PAGE' => $phpbb_seo->seo_static['pagination'],
'SEO_EXT_PAGE' => $phpbb_seo->seo_ext['pagination'])
);
// www.phpBB-SEO.com SEO TOOLKIT END

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

/**
* Generate page footer
*/
function page_footer($run_cron = true)
{
global $db, $config, $template, $user, $auth, $cache, $starttime, $phpbb_root_path, $phpEx;

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
if (!empty($phpbb_seo)) {
$phpbb_seo->seo_end();
}
// www.phpBB-SEO.com SEO TOOLKIT END

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

$debug_output .= ' | <a href="' . build_url() . '&explain=1">Explain</a>';

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$url_prefix = build_url();
$debug_output .= ' | <a href="' . $url_prefix . ((strpos($url_prefix, '?') === false) ? '?' : '&') . 'explain=1">Explain</a>';
// www.phpBB-SEO.com SEO TOOLKIT END

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

includes/functions_content.php

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

function parse_attachments($forum_id, &$message, &$attachments, &$update_count, $preview = false)
{
if (!sizeof($attachments))
{
return;
}

global $template, $cache, $user;
global $extensions, $config, $phpbb_root_path, $phpEx;

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
// www.phpBB-SEO.com SEO TOOLKIT END

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

$download_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id']);

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
//$download_link = append_sid("{$phpbb_root_path}download/file.$phpEx", 'id=' . $attachment['attach_id']);
$download_link = "{$phpbb_root_path}download/file.$phpEx?id=" . $attachment['attach_id'];
$comment_clean = preg_replace('`<[^>]*>`Ui', ' ', $comment);
$block_array += array(
'COMMENT_CLEAN' => $comment_clean,
);
if (!empty($phpbb_seo->seo_opt['rewrite_files'])) {
if (empty($phpbb_seo->seo_url['file'][$attachment['attach_id'>)) {
if (($_pos = utf8_strpos($comment, '<br')) !== false) {
$comment_url = strip_tags(utf8_substr($comment, 0, $_pos));
} else {
$comment_url = $comment_clean;
}
$comment_url = utf8_strlen($comment_url) > 60 ? utf8_substr($comment_url, 0, 60) : $comment_url;
$phpbb_seo->seo_url['file'][$attachment['attach_id'> = $phpbb_seo->format_url($comment_url, $phpbb_seo->seo_static['file'][$display_cat]);
}
}
// www.phpBB-SEO.com SEO TOOLKIT END

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

$block_array += array(
'S_FLASH_FILE' => true,
'WIDTH' => $width,
'HEIGHT' => $height,
'U_VIEW_LINK' => $download_link . '&view=1',
);

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

$block_array += array(
'S_FLASH_FILE' => true,
'WIDTH' => $width,
'HEIGHT' => $height,
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
'U_VIEW_LINK' => append_sid($download_link . '&view=1'),
// www.phpBB-SEO.com SEO TOOLKIT END
);

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

$l_download_count = (!isset($attachment['download_count']) || $attachment['download_count'] == 0) ? $user->lang[$l_downloaded_viewed . '_NONE'] : (($attachment['download_count'] == 1) ? sprintf($user->lang[$l_downloaded_viewed], $attachment['download_count']) : sprintf($user->lang[$l_downloaded_viewed . 'S'], $attachment['download_count']));

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$download_link = append_sid($download_link);
// www.phpBB-SEO.com SEO TOOLKIT END

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

$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : str_replace(array('={USER_ID}', '=%7BUSER_ID%7D'), '=' . (int) $user_id, $_profile_cache['base_url']);

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
// $profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : str_replace(array('={USER_ID}', '=%7BUSER_ID%7D'), '=' . (int) $user_id, $_profile_cache['base_url']);
global $phpbb_seo, $phpbb_root_path, $phpEx;
$phpbb_seo->set_user_url( $username, $user_id );
$profile_url = ($custom_profile_url !== false) ? $custom_profile_url . '&u=' . (int) $user_id : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . (int) $user_id);
// www.phpBB-SEO.com SEO TOOLKIT END

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

includes/functions_display.php

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

function display_forums($root_data = '', $display_moderators = true, $return_moderators = false)
{
global $db, $auth, $user, $template;
global $phpbb_root_path, $phpEx, $config;

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
// www.phpBB-SEO.com SEO TOOLKIT END

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

while ($row = $db->sql_fetchrow($result))
{
$forum_id = $row['forum_id'];

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$phpbb_seo->set_url($row['forum_name'], $forum_id, $phpbb_seo->seo_static['forum']);
// www.phpBB-SEO.com SEO TOOLKIT END

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

function generate_forum_nav(&$forum_data)
{
global $db, $user, $template, $auth;
global $phpEx, $phpbb_root_path;

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
// www.phpBB-SEO.com SEO TOOLKIT END

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

foreach ($forum_parents as $parent_forum_id => $parent_data)
{
list($parent_name, $parent_type) = array_values($parent_data);

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$phpbb_seo->set_url($parent_name, $parent_forum_id, $phpbb_seo->seo_static['forum']);
// www.phpBB-SEO.com SEO TOOLKIT END

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

/**
* Generate topic pagination
*/
function topic_generate_pagination($replies, $url)
{
global $config, $user;

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo, $phpEx;
// www.phpBB-SEO.com SEO TOOLKIT END

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

}
else
{
$pagination = '';
}

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if (!empty($phpbb_seo->seo_opt['url_rewrite'])) {
static $pagin_find = array();
static $pagin_replace = array();
if (empty($pagin_find)) {
$pagin_find = array( '`(\.(?!' . $phpEx . ')[a-z0-9]+)([\w\#$%&~\-;:=,?@+]*)&start=([0-9]+)`i', '`/([\w\#$%&~\-;:=,?@+]*)&start=([0-9]+)`i' );
$pagin_replace = array( $phpbb_seo->seo_delim['start'] . '\\3\\1\\2', '/' . $phpbb_seo->seo_static['pagination'] . '\\2' . $phpbb_seo->seo_ext['pagination'] .'\\1' );
}
$pagination = str_replace( '&start=0', '', $pagination );
$pagination = preg_replace( $pagin_find, $pagin_replace, $pagination );
}
// www.phpBB-SEO.com SEO TOOLKIT END

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

function get_moderators(&$forum_moderators, $forum_id = false)
{
global $config, $template, $db, $phpbb_root_path, $phpEx, $user, $auth;

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
// www.phpBB-SEO.com SEO TOOLKIT END

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

$group_name = (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name'> : $row['group_name']);

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$phpbb_seo->prepare_url('group', $row['group_name'], $row['group_id']);
// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ ]------------------------------------------
#
function display_user_activity(&$userdata)
{
global $auth, $template, $db, $user;
global $phpbb_root_path, $phpEx;
#
#-----[ ]------------------------------------------
#

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
global $phpbb_seo;
// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ ]------------------------------------------
#
$sql = 'SELECT topic_title
FROM ' . TOPICS_TABLE . '
WHERE topic_id = ' . $active_t_row['topic_id'];
$result = $db->sql_query($sql);
$active_t_row['topic_title'] = (string) $db->sql_fetchfield('topic_title');
#
#-----[ ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$sql = 'SELECT t.topic_title, t.topic_type ' . (!empty($phpbb_seo->seo_opt['sql_rewrite']) ? ', t.topic_url' : '') . ', f.forum_id, f.forum_name
FROM ' . TOPICS_TABLE . ' AS t, ' . FORUMS_TABLE . ' AS f
WHERE t.topic_id = ' . $active_t_row['topic_id'] . '
AND f.forum_id = t.forum_id';
$result = $db->sql_query($sql);
$seo_active_t_row = $db->sql_fetchrow($result);
if ($seo_active_t_row) {
$active_t_row = array_merge($active_t_row, $seo_active_t_row);
}
// www.phpBB-SEO.com SEO TOOLKIT END
#
#-----[ ]------------------------------------------
#
$active_f_pct = ($userdata['user_posts']) ? ($active_f_count / $userdata['user_posts']) * 100 : 0;
#
#-----[ ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
$phpbb_seo->set_url($active_f_name, $active_f_id, $phpbb_seo->seo_static['forum']);
// www.phpBB-SEO.com SEO TOOLKIT END

#
#-----[ ]------------------------------------------
#
$active_t_pct = ($userdata['user_posts']) ? ($active_t_count / $userdata['user_posts']) * 100 : 0;
#
#-----[ ]------------------------------------------
#
// www.phpBB-SEO.com SEO TOOLKIT BEGIN
if (!empty($seo_active_t_row)) {
$active_t_forum_id = (int) $active_t_row['forum_id'];
$phpbb_seo->set_url($active_t_row['forum_name'], $active_t_forum_id, $phpbb_seo->seo_static['forum']);
$phpbb_seo->prepare_iurl($active_t_row, 'topic', $active_t_row['topic_type'] == POST_GLOBAL ? $phpbb_seo->seo_static['global_announce'] : $phpbb_seo->seo_url['forum'][$active_t_forum_id]);
}
// www.phpBB-SEO.com SEO TOOLKIT END



:
http://web-tourist.net/login/login/view.php?st=2820






/ /