You are here: Re: regular expression matches too much, how to limit? « PHP Programming Language « IT news, forums, messages
Re: regular expression matches too much, how to limit?

Posted by lawrence k on 11/03/06 00:06

lawrence k wrote:
> I put this in my htaccess file:
>
> > Options FollowSymLinks
> > RewriteEngine On
> > RewriteBase /
>
> > RewriteCond %{REQUEST_URI} /abelokugawa
> > RewriteRule abelokugawa /media/audio/index.php?pageId=182
>
> It works well here:
>
> http://www.monkeyclaus.org/diario/
>
> However, it matches against too much. No one can see this jpeg image:
>
> http://www.monkeyclaus.org/images/gallery/diario/diario01.jpg
>
> How to limit this regex?


For anyone curious, I found this works fine:

RewriteCond %{REQUEST_URI} /diario/*$
RewriteRule diario
http://www.monkeyclaus.org/media/audio/index.php?pageId=957

 

Navigation:

[Reply to this 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

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