Re: RewriteRule

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

 



On Sun, Mar 23, 2008 at 11:19 AM, Nils Jeppe <nils@xxxxxxxxxxxxxx> wrote:
>
>
>  On Sun, 23 Mar 2008, Sam Carleton wrote:
>
>  > The category/fldoid is always going to be present, the p can be
>  > changed for other variables, so this is what I came up with, but the 7
>  > is not being picked up by the PHP code:
>
>  Well - you terminate your rule at .php and then create a new url with
>  empty values for the parameters. Afaik your previous parameters get
>  discarded when you create new ones. Also afaik, you can not parse the
>  parameters with mod_rewrite, so you can't grab the numeric part and insert
>  it on the right side manually. It's either "take all parameters as-is" or
>  "create completely new ones from scratch". A workaround would be to encode
>  the numeric value as part of the filename or directory in some way.

Not quite. See:
http://wiki.apache.org/httpd/RewriteQueryString

The problem can probably be fixed by adding the [QSA] flag to the
RewriteRule. If that doesn't work, you need a
RewriteCond %{QUERY_STRING} (.+)
and then use %1 to back-reference the query-string in the RerwiteRule.

Joshua.

---------------------------------------------------------------------
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