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  
 
   
Rewrite problem when clicking from google.

 
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
::  
Author Message
GoBieN
PR0
PR0


Joined: 10 Mar 2008
Posts: 53
Location: Belgium

Rewrite problem when clicking from google.Posted: Mon Mar 24, 2008 2:32 pm    Post subject: Rewrite problem when clicking from google.

i'll describe my problem.
When i do a search in google for pages from my site with the site:www.domain.tld query, I get lots of pages.

When i check a page i see the correct SEO url
example: www.camino-tuning.be/honda-camino-koop-f5/topic22823.html

Now when i click on it i get a redirect to the page:
http://www.camino-tuning.be/honda-camino-koop-f5/topic22823.html?hilit=site:www.camino%20tuning.be

So that's with the google query (from referrer) as hilit query
The problem is that then the pages fails with the error message:
Firefox has detected that the page redirects in a not valid way .... that means an endless loop i think.

I think i add the code for the hihlit from a simple mod once, but i don't know where anymore. So my question is could the rewrite rules be adjusted so that the ablove link with hilit paramter is correctly rewritten ?
Back to top
Visit poster's website
GoBieN
PR0
PR0


Joined: 10 Mar 2008
Posts: 53
Location: Belgium

Rewrite problem when clicking from google.Posted: Mon Mar 24, 2008 3:29 pm    Post subject: Re: Rewrite problem when clicking from google.

I found the mod btw:
http://www.phpbb.com/community/viewtopic.php?t=784615

For now i disabled the code change, but would like to know what to alter, either to the rules or to the mod code to get it to work.
Code:
//$hilit_words   = request_var('hilit', '', true);
$se_hilit = $referer = '';
if(isset($_SERVER['HTTP_REFERER']) || (getenv('HTTP_REFERER') !== false))
{
   set_var($referer, (isset($_SERVER['HTTP_REFERER']) ? trim($_SERVER['HTTP_REFERER']) : trim(getenv('HTTP_REFERER'))), 'string');
   $referer = @parse_url(htmlspecialchars_decode(utf8_normalize_nfc($referer)));
   
   if(($referer !== false) && !empty($referer['query']))
   {
      $query_string = array();
      parse_str($referer['query'], $query_string);
      
      $engines = array(
         'q'         => 'google|live|msn|alltheweb|altavista|aol|ask|search|gigablast|najdi|netsprint|pchome|seznam|szukacz',
         'p'         => 'yahoo',
         'query'      => 'aol|cnn|lycos|mama|mamma|netscape',
         'terms'      => 'about',
         't'         => 'alice',
         'encquery'   => 'aol',
         'wd'      => 'baidu',
         'qt'      => 'looksmart',
         'rdata'      => 'voila',
         'k'         => 'yam',
         'text'      => 'yandex'
      );

      foreach($engines as $qs => $pattern)
      {
         if(!empty($query_string[$qs]) && preg_match("#^(.+\.)*($pattern)(\.[a-z]{2,4}){1,2}$#U", $referer['host']))
         {
            $se_hilit = trim(preg_replace('#\s{2,}#', ' ', str_replace(array('+', '-', '|', '(', ')'), ' ', $query_string[$qs])));
            break;
         }
      }
   }
}
$hilit_words = request_var('hilit', $se_hilit, true);
Back to top
Visit poster's website
dcz
Administrateur - Site Admin
Administrateur - Site Admin


Joined: 28 Apr 2006
Posts: 13354

Rewrite problem when clicking from google.Posted: Mon Mar 24, 2008 3:43 pm    Post subject: Re: Rewrite problem when clicking from google.

It's THE bug with highlights composed of more than one word.
http://www.phpbb-seo.com/boards/advanced-seo-url/discussions-vt1334.html#14085

++

_________________
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
Display posts from previous:   
Post new topic   Reply to topic    phpBB SEO » SEO Forum  » phpBB3 mod Rewrite  » Advanced SEO URL
Page 1 of 1

Navigation Similar Topics

Jump to: