httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Smith" <g...@primeexalia.com>
Subject RE: [users@httpd] Alias all files to one script ?
Date Mon, 15 Mar 2004 10:09:12 GMT
Create the directory /bar and then put the 404 entry into the .htaccess file.


/bar/.htaccess:
ErrorDocument 404 /scripts/myscript.php4

This will override the default directory settings (or add to them) for the directory path
inside of the httpd.conf file.  This does assume that override is allowed in the httpd.conf
file.  You can have a similar one in the / and the /bar/.htaccess will override it for that
one directory (and it's subdirs) only.

Hope this helps


Gary Wayne Smith




-----Original Message-----
From: ing.Martin Prášek [mailto:prasek@silesia.cz] 
Sent: Monday, March 15, 2004 1:59 AM
To: users@httpd.apache.org
Subject: [users@httpd] Alias all files to one script ? 

On server www.foo.com there is directory /bar in server root. I need  to do some configuration
changes to Apache (1.3.26) in my box to fulfill the following requirements: 

If there comes a request for www.foo.com/bar/whatever Apache should not return "whatever",
to client, but should run "www.foo.com/scripts/myscript.php4" and return its output (ie myscript.php4
take a responsibility what will be returned to client). This should be done for every request
for files and subdirectories inside /bar and even for /bar directory itself. Note that I need
preserve (ie feed to myscript.php4) as much request variableas as posssible (ip adress of
clients, GET, POST and COOKIES, HTTP headers etc).


For some raeson I do not want PHP to run as CGI too. It should be transparent for clients,
so  3xx status code (redirection) is not solution for me.  

i read the documentation and I find only AddHandler and AddAction, but seems it allow only
to call a CGI program and match only extensions (fix me if I am wrong).

Tnanx for help.

PS: Execuse my bed English.

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message