httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Zuckerman <j.zucker...@gmail.com>
Subject Re: [users@httpd] More RewriteRule issues ..
Date Tue, 24 Nov 2009 20:26:27 GMT
On Tue, Nov 24, 2009 at 12:38 AM, Boyle Owen <Owen.Boyle@six-group.com> wrote:
>> -----Original Message-----
>> From: bearsfoot [mailto:adam.p.reynolds@gmail.com]
>> Sent: Tuesday, November 24, 2009 3:24 AM
>> To: users@httpd.apache.org
>> Subject: [users@httpd] More RewriteRule issues ..
>>
>>
>> Hi,
>>
>> I have the following rules in my .htaccess.
>>
>> RewriteRule products/(.*)/ /index.php?view=products&brand=$1 [L]
>> RewriteRule products/(.*)/(.*)/
>> /index.php?view=productdetail&brand=$1&id=$2
>> [L]
>>
>> These are the urls the users see:
>> http://www.mysite.com/products/product-name/
>> http://www.mysite.com/products/product-name/1/
>>
>> These are the pages the users see:
>> http://www.mysite.com/index.php?view=products&brand=product-name
>> http://www.mysite.com/index.php?view=productdetail&brand=produ
> ct-name&id=1
>>
>>
>> I want to add another rule rewrites the folowing url.
>> http://www.mysite.com/products/product-name/?filter=10
>>
>> to
>>
>> http://www.mysite.com/index.php?view=products&brand=product-na
> me&filter=10
>>
>> Can someone please show me how to implement this rule without
>> interferring
>> with the existing second rule  ?
>
> What did you try yourself already? What results did you get? What
> problems did you encounter?
>
> Rgds,
> Owen Boyle
> Disclaimer: Any disclaimer attached to this message may be ignored.
>
> Hint: A query-string is NOT part of the URL and so is not immediately
> visible to a RewriteRule. For further details, check out:
> http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule (and
> read the grey box "what is matched?")
> http://wiki.apache.org/httpd/RewriteQueryString
>
>
>>
>> Thanks,
>> Adam
>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/More-RewriteRule-issues-..-tp26489575p26
> 489575.html
>> Sent from the Apache HTTP Server - Users mailing list archive
>> at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> The official User-To-User support forum of the Apache HTTP
>> Server Project.
>> See <URL:http://httpd.apache.org/userslist.html> for more info.
>> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
>> For additional commands, e-mail: users-help@httpd.apache.org
>>
>>
>
> This message is for the named person's use only. It may contain confidential, proprietary
or legally privileged information. If you receive this message in error, please notify the
sender urgently and then immediately delete the message and any copies of it from your system.
Please also immediately destroy any hardcopies of the message.
> The sender's company reserves the right to monitor all e-mail communications through
their networks.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

This is an end-user to end-user help list for the Apache webserver, if
the listserv description was accurate, we would help you get
mod_rewrite *installed* and stop right there.  It sounds like what you
really are asking for help with is regular expressions - which we're
all happy to help with, but we'll need a little bit more info and some
re-assurance that you're going far enough by reading the manual and
trying to help yourself.

Specifically addressing your problem, I think you're interested in the
flag "QSA" (query-string all).  Check it out in the link that Owen
directed you to, or this site which has a nicely condensed version:
http://www.addedbytes.com/apache/mod_rewrite-cheat-sheet/

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message