You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Krishnakuma Govindarajan <kg...@mainex1.asu.edu> on 2004/03/08 20:57:27 UTC

[users@httpd] Question regarding SSI

Hi,
I have a question regarding SSI's. I have two types of files, a .php and
then .htm files. The name of the file to be included would be sent
through the url and it would be just the name of the file and there
would be no extension. In that case, I have to include <filename>.htm,
and if it doesn't exist, I have to include <filename>.php. I'm not sure
on how to check whether a file exists or not. Any Ideas?
Thanks in advance,
Krishna

Re: [users@httpd] Question regarding SSI

Posted by Joshua Slive <jo...@slive.ca>.
Krishnakuma Govindarajan wrote:
> I have a question regarding SSI’s. I have two types of files, a .php and 
> then .htm files. The name of the file to be included would be sent 
> through the url and it would be just the name of the file and there 
> would be no extension. In that case, I have to include <filename>.htm, 
> and if it doesn’t exist, I have to include <filename>.php. I’m not sure 
> on how to check whether a file exists or not. Any Ideas?

Start by looking at  "Multiviews" under 
http://httpd.apache.org/docs-2.0/content-negotiation.html#negotiation

It does pretty much exactly what you want automatically.

Joshua.

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