Re: Help needed on using python script from Apache Rewrite configuration

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

 



Hi,


I have changed the calling script in below way :
RewriteRule "-" "${path:%{ENV:vrg}}"

But in python script, not able to retrieve the value of "vrg".
​Kindly send a sample code in python to get the value and pass a return string back to rewrite module.

Regards,
D Pal

From: Debananda Pal -X (debanapa - WIPRO LIMITED at Cisco)
Sent: 17 May 2017 16:23
To: users@xxxxxxxxxxxxxxxx; neilsdisco(mailer list)
Cc: neilsdisco(mailer list)
Subject: Help needed on using python script from Apache Rewrite configuration
 

Hi,


I have Server version: Apache/2.2.31 (Unix) and trying to pass few arguments from Apache rewrite conf file to Python (version 2.6) script.

Also, I want to process the python output in rewrite configuration file.


Please let me know, how can I pass variables to python script and retrieve the output in rewrite configuration file.
I have loaded mod_python-3.3.1-16.el6.x86_64 and updated the httpd.conf file with proper path.

I have tried below steps just to verify, but no luck :
==========================
RewriteEngine On

RewriteMap d2u "prg:/opt/httpd/custom.d/python_test.py"
RewriteRule .? - [E=vrg:abcd-xyz]​
RewriteRule "-" "${path:%{vrg}e}"
===========================

​Regards,
D Pal



[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