Solved

How to make a dynamic "path to Perl" with mod_rewrite in Apache?

Posted on 2004-10-19
5
278 Views
Last Modified: 2010-03-04
Hello,

I have follow problem:
I work with a Apache server offline. When I create a new Perl project then I have to point in the Perl script to Perl.exe
for example "#!c:\xampp\perl\bin\perl.exe"
Later when I want upload the Perl project then I have to change in all scripts the path to perl, for example "#!/usr/bin/perl"

This process is very tiresome. I want change the path to Perl with the Apache Modul mod_rewrite dynamically.
The rewrite modul should change automatically all path to perl into "#!c:\xampp\perl\bin\perl.exe"
I would be very grateful, when some guy could help me!!

Thank you in advance!
Mike
0
Comment
Question by:idiwa
  • 2
5 Comments
 
LVL 5

Accepted Solution

by:
mrielf earned 500 total points
ID: 12402871
It is impossible to do with mod_rewrite, because perl is interpreted outside from apache.

But I think you don't need this, because as I know the windows don't uses perl script's first line to identify the interpreter (but possibly I know wrong this (I have no experience with web server and perl on windows), however to run perl from windows (not from webserver) nedded only file association)

0
 
LVL 5

Expert Comment

by:mrielf
ID: 12594232
What asker want, is impossible. But it's writen in my answer...
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question