Re: RewriteCond how to set variable

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

 



> My email client displayed what you wanted me to insert incorrectly.  I
> put the code in correctly but it still does not work.  I added R=301 to
> the end so that it would redirect so I could check the apache logs.
> 
> The apache log shows this:
> uob017.admin.uiuc.edu - - [21/Dec/2010:11:46:23 -0600] "GET
> /calendar/Calendar?calId=7&skinId=2155 HTTP/1.1" 301 417 "-"
> "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13)
> Gecko/20101203 Firefox/3.6.13"
> uob017.admin.uiuc.edu - - [21/Dec/2010:11:46:23 -0600] "GET
> /calendar/list/ HTTP/1.1" 302 - "-" "Mozilla/5.0 (Windows; U; Windows NT
> 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13"
> 
> You can see that the values did not get put into the URL.

OK.  This is where I think the documentation is a little unclear.
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule says that
the substitution string can include "server-variables as in rule condition
test-strings (%{VARNAME})".  The question is whether %{calId} and %{skinId}
qualify as "server variables", or just plain old "environment variables".
It may be the latter, in which case my suggestion won't work.  Sorry.

Eric suggested several other approaches which all look feasible.

Good luck,
Andrew.


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