RE: Re: What's wrong with this rewrite rule?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael <mailto:phpnews@xxxxxxxxxxx>
    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"...
> 
> Easy thing to miss, though...

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



Chris.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux