You are here: RE: [PHP] Re: What's wrong with this rewrite rule? « PHP « IT news, forums, messages
RE: [PHP] Re: What's wrong with this rewrite rule?

Posted by phpnews on 10/02/94 11:07

On Wed, 2 Feb 2005 12:09:43 -0800, "Chris W. Parker"
<cparker@swatgear.com> said:
> Michael <mailto:phpnews@mas.ml1.net> on Wednesday, February 02,
> 2005 11:54 AM said:
>
> > You're insisting that the path to rewrite start with d. It's not
> > going to start with d, it's going to start with /. As in
> > "/detail.asp"...
>
> Actually that's not why. None of my other rules begin with a /. The
> problem is because mod_rewrite does not handle the query string by
> default. You have to setup a special rule for that.
>
> Here is the solution:
>
> RewriteCond %{QUERY_STRING} product_id=([\w-]+) RewriteRule
> ^detail\.asp product.php?id=$1

Aha. Is this in a .htaccess file? In any case, I'm glad you found the
answer!

Mike

 

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

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