Reply to Re: modrewrite (won't work for second rule)

Your name:

Reply:


Posted by Justin Koivisto on 12/21/05 17:03

Andrew wrote:
> hi there,
> does anyone know why this modrewrite doesn't work?
>
> RewriteEngine On
> RewriteBase /
> RewriteRule ^([^/]+)\.html$ pdisplay.php?page=p2/$1&type=htm
> RewriteRule ^([^/]+)\.html$ gdisplay.php?page=g2/$1&type=htm
>
> It works for the first rule but not the second?

The first RewriteRule matches the request whatever.html and then changes
it to:

pdisplay.php?page=p2/whatever&type=html

The second rule uses the *same* pattern to match and tries to match the
above.

It looks like you actually wanted to use the following rule:

RewriteRule ^([^/]+)\.htm$ gdisplay.php?page=g2/$1&type=htm
-------------------------^ (removed extra "l" in the pattern)

--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com

[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

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