RewriteCond how to set variable

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

 



I have the following RewriteCond.  I put numbers in front of each line for reference:

 

1)      RewriteCond %{QUERY_STRING} !XSL=NONE [NC]

2)      RewriteCond %{QUERY_STRING} calId=([0-9]+) [NC]

3)      RewriteCond %{QUERY_STRING} skinId=([0-9]+) [NC]

4)      RewriteRule ^/calendar http://test.webservices.illinois.edu/calendar/list/%1?skinId=%2      [L]

 

I just learned that when you use %1 and %2 in line 4 it will only reference the last RewriteCond.  So in line 4 the %1 comes from line 3 but the %2 is blank.  I actually wanted the values from line 2 & 3 to be inserted into line 4.

 

How do you set a local variable in line 2 and 3 so that in line 4 I can reference them? 

 

 

Thanks,

 

Lance Campbell

Software Architect/DBA/Project Manager

Web Services at Public Affairs

217-333-0382

 


[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