Reply to Re: Redirect

Your name:

Reply:


Posted by Curtis on 02/17/07 06:56

Rik wrote:
> On Fri, 16 Feb 2007 19:36:18 +0100, <mariusz@polbank.info> wrote:
>
>> Hello
>>
>> I want to redirect www.mysite.com/aaaa/p1/p2/p3 to www.mysite.com/bbbb/
>> p1/p2/p3,
>> because Google has indexed sites with 'aaaa' and 'bbbb'. But they are
>> the same sites.
>>
>>
>> I can't do it in .htaccess file becasue I'm taking p3 parameter from
>> mysql database.
>
> Why not?
>
> RewriteEngine On
> RewriteRule ^/aaaa(.*)$ /bbbb$1 [L,R=301,QSA]
> --Rik Wasmus

mod_rewrite is not always needed, and should be avoided, when
RedirectMatch will do. Apache has the very cool RedirectMatch directive.

RedirectMatch seeother ^/aaaa(.*)$ http://www.mysite.com/bbb$1

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация