httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rich Bowen <rbo...@rcbowen.com>
Subject Re: [users@httpd] Directorymatch Help Needed
Date Thu, 06 Jan 2005 18:31:39 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jon Block wrote:
| I have a directory that I'm referencing within my virtual host such
that if
| you request:
|
| www.example.com/pony3/yay.html
|
| That pony directory is an alias that really goes to:
|
| \\10.0.0.100\ponyshare3\yay.html
|
| I want to be able to use directory match to say "if a request is made into
| \\10.0.0.100\ponyshare3 and the file isn't found, call an error document.
| This used to be really simple when the file was on the local machine:
|
| <DirectoryMatch "C:/ponyshare[0-9]+">
|  ErrorDocument 404 /bla.html
| </DirectoryMatch>
|
| But now that I'm trying to use a unc path, I can't get it to work:
|
| <DirectoryMatch "\\\\10.0.0.100\\ponyshare[0-9]+">
| 	ErrorDocument 404 /bla.html
| </DirectoryMatch>
|
| I have to use a regular expression because there is a number after the
| ponyshare folder name.
|
| Am I doing something obviously wrong? Can someone help?

You're making it considerably harder than you need to.

<DirectoryMatch "ponyshare[0-9]+">
ErrorDocument 404 /bla.html
</DirectoryMatch>

DirectoryMatch is a substring match, and so needs only contain part of
the total string.

- --
Rich Bowen - rbowen@rcbowen.com
There's more than one way to eat a rhesus
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB3YQLXP03+sx4yJMRAnjYAJ449L/2pMbaPXMEwizIpqZECPL+eQCgtRmE
+LVWBFTB/QH5O/LtYep2zG4=
=PSel
-----END PGP SIGNATURE-----

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