Click to See Complete Forum and Search --> : Directory Aliases


Anon
07-25-2000, 03:35 PM
Is there some Apache property that redirects all requests to a certain directory (or file under that directory) to a php script?

While I have this working on Solaris, with no explicit property set in httpd.conf or .htaccess or anything (as far as I can tell), it doesn't work on WinNT/Apache/PHP3.

What I want is for all references to

http://localhost/library/x/y/z.html

to goto my script in

/library.php


Thanks.

Steve Spencer

Anon
07-25-2000, 04:11 PM
The Apache guys did include the Redirect command to tell your visitors where to look for the relocated document:

Redirect library/x/y/z.html /library.php

Put that anywhere in your httpd.conf, and you'll enable a redirect for that page. You could also use meta tags on the library/x/y/z.html page to automatically transport visitors to that new page.

Anon
07-25-2000, 06:52 PM
I don't think redirects are what I'm looking for -- I just don't need it for one file.

Basically, every file with

/library/

in it goes to the library.php script,which then serves dynamic content, based on the path.

so

/library/x.html
/library/x/y.html
/library/x/y/z/abc.html
/library/whatever/i/want.html

all go thru the same library.php script.

I know this is possible with the solaris version of apache and it seems the default behavior. How do I get this working on windows???

I tried the suggestions from
http://www.phpbuilder.com/columns/tim20000526.php3

but they do not work on windows.

Anon
07-26-2000, 08:19 AM
Take a look at Tim's article at:

http://www.phpbuilder.com/columns/tim20000526.php3

/Mike

Anon
07-26-2000, 01:22 PM
Mike Hall wrote:
-------------------------------
Take a look at Tim's article at:

http://www.phpbuilder.com/columns/tim20000526.php3

/Mike


I did and it doesn't work for windows. Hence the question. Tim suggested to start trying various combinations of back slashes for the path instead of forward slashes. I'll try that next.