Re: More RewriteRule issues ..

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

 



On Tue, Nov 24, 2009 at 12:38 AM, Boyle Owen <Owen.Boyle@xxxxxxxxxxxxx> wrote:
>> -----Original Message-----
>> From: bearsfoot [mailto:adam.p.reynolds@xxxxxxxxx]
>> Sent: Tuesday, November 24, 2009 3:24 AM
>> To: users@xxxxxxxxxxxxxxxx
>> Subject:  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@xxxxxxxxxxxxxxxx
>>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
>> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>>
>>
>
> 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@xxxxxxxxxxxxxxxx
>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>

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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux