Getting actual filesystem location of request URI in a script

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

 



Hi,

I have the following configuration:

Alias /abcd/ /somedir
<Directory /somedir>
DirectoryIndex /cgi-bin/index.cgi
...

When I access /abcd the script index.cgi gets executed. However it gets executed with the current working directory set to cgi-bin. Is there anyway to get it to execute with current directory set to somedir?

I checked the environment variables passed to the script. None of them give any inkling of the the existence of /somedir.

Is it possible to get the actual filesystem path as specified by the Directory directive in script, before it is translated by DirectoryIndex ?

Basically I want index.cgi to be executed whenever a certain set of Aliases are accessed. However I dont want to maintain an index.cgi file in each filesystem directory location referenced by the Aliases. I would like to have a common index.cgi file but which can figure out which filesystem directory it was originally supposed to have been found.

Thanks,
Emmanuel

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