Add Enviroment paramenters with RewriteRule ?????

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

 



Hi, folks:

I have a problem with setting enviroment paramenters with
RewriteRule.. For example, in my document_root/.htaccess, I had:

RewriteEngine on
RewriteBase  /
RewriteRule ^([^/]+)/   -  [E=Location:$1]
RewriteRule ^dir/(.*)$  guestbook/dir.html?q=$1  [QSA,L,PT]

By line3, I want to add an enviroment parameter to some specific URLs, i.e.
If the URL is http://mysite.com/guest/book.html, it will get an
Enviromental parameter as:

  $ENV{Location} = 'guest';

but what I get is:      $ENV{Location} = 'bin';

It's probably that I am using Perl with FastCGI, the fcgi executable
is located in

    document_root/bin/handler.fcgi

this seems have explained the problem... but the RewriteRule at line-4
works properly, it doesnot add /bin in its path.. So what makes it
different if or not I use the [E=var:val] flag in the RewriteRule??

My system: Apache2.059, mod_fastcgi 2.4.2, Linux(2.6.18) Ubuntu box..

(should have an upstream Proxy server, since I got
HTTP_X_FORWARDED_FOR in my %ENV), only .htaccess available now.

Thanks in advance,

lihao(XC)

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