phpBB SEO
Boards
Directory  
SEO  
Downloads
  phpBB SEO : Search Engine Optimization, Directory, Forums  
Index
Forums
Annuaire
Référencement
Télécharger
 
  Search Rechercher
    Register
Username :  Password :  Log me on automatically each visit  
S'enregistrer  
 
   
Chinese and title injection in URLs

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
::  
Author Message
n260009610



Joined: 22 Sep 2006
Posts: 6

Chinese and title injection in URLsPosted: Sat Sep 23, 2006 7:05 am    Post subject: Chinese and title injection in URLs

I am Chinese

chinese simplified windows

Open

phpBB-SEO-Advanced-mod-Rewrite_V_0.0.2.txt


Code:
#-----[ OPEN ]------------------------------------------
#
#

include/function.php

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

?>

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

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
function if_query($amp)
{

   if($amp != '')
   {
      return '?';
   }

}
function format_url($url)
{
   $url = preg_replace("(\[.*\])U","",$url);
   $find = array('"','&','\r\n','\n');
   $url = str_replace ($find, '-', $url);
   $url = str_replace ('?, 'ss', $url);
   $url = str_replace (array('?,'?), 'oe', $url);
   $url = str_replace (array('?,'?), 'ae', $url);
   $url = str_replace (array('?,'?), 'ue', $url);
   $find = "懒旅培徕沐矣哉仳篝貘壬仕栝觌晴掏蜗祉铒仝垸疡";
   $replace = "AAAAAaaaaaOOOOOoooooEEEEeeeeCcIIIIiiiiUUUuuuyNn";
   $url = strtr($url,$find,$replace);
   $url = strtolower($url);
   $url = ereg_replace("[^a-zA-Z0-9]", "-", $url);
   while (strstr($url, '--')) $url = str_replace('--', '-', $url);
   $url = (substr($url, 0, 1) == '-') ? substr($url, 1) : $url;
   $url = (substr($url, strlen($url) - 1, 1) == '-') ? substr($url, 0, strlen($url) - 1) : $url;
   return $url;
}
// www.phpBB-SEO.com SEO TOOLKIT END

#



$find = "懒旅培徕沐矣哉仳篝貘壬仕栝觌晴掏蜗祉铒仝垸疡"; ?????

Coding error?????


Please help me...

ths...
Back to top
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 15127

Chinese and title injection in URLsPosted: Sat Sep 23, 2006 10:32 pm    Post subject: Re: Chinese and title injection in URLs

And welcome Very Happy

This come from your local char-set encoding. All of these are special characters like éàèü etc.. to be filtered prior to url injection.

The problem is the URL standard only accept the first 127 characters of the ASCII table, thus nothing in Chinese.

So injecting keywords in URL is only interesting if you are using at least some English in your phpBB forum and topic titles, which could be the case if for example you'd run a technical web site using many English words as it could be the case when talking about web design and such.

For these kind of cases, and thanks to our UTF-8 specialist (Wink amir)I developed a solution to filter anything, even UTF-8 (thus Chinese, cyrillic, Arabic, Hebrew, Persian etc ...) but English keywords.

I did not release it yet because it's not useful in many cases and I first want to update and release the phpBB SEO mod rewrite before I go for more specific releases. I mean the mod rewrite are working nicely, but the update is required to make them able to deal with a lot more than just rewriting phpBB URLs Wink

Anyway, the code is already being deployed here for example, so if you feel like your project will use more than occasionally English or at least words using Latin characters, then tell me and I'll send you a dl link.

In all other case, the phpBB SEO Simple mod rewrite is a great and fast as light mod rewrite solution for any type of languages using char-set that cannot be used in URLs.

++

_________________
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
Visit poster's website
n260009610



Joined: 22 Sep 2006
Posts: 6

Chinese and title injection in URLsPosted: Sun Sep 24, 2006 9:49 am    Post subject: Re: Chinese and title injection in URLs

Oh, ths...
Back to top
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB mod Rewrite
Page 1 of 1

Navigation Similar Topics

Jump to: