>> I've searched high an low but can not find how to do this. I would
>> like to know how make my files accessible by just the name without an
>> extension.. Such as: "http://www.sitename.com/file.php" would like to
>> access the "file.php" file just as "http://www.sitename.com/file/" the
>> last server I had my site hosted on had this feature.. but I don't
>> know the name.. if you could help me I'd be very grateful..
>> BTW, I know nothing of Unix or webservers.. I will be passing this
>> info on to my host..
>Depends on the server software. On Apache, this is activated using
>Options +Multiviews
>(But you shouldn't use the trailing slash, since it will mess up
>relative URL references.)
As Joshua said, you want to look at enabling "Multiviews",
but before you do, I'd suggest you look at:
<http://httpd.apache.org/docs/mod/mod_mime.html#multipleext>
and the rest of that page also, as well as:
<http://httpd.apache.org/docs/content-negotiation.html>
For example, say you have "file.php" in your server's root
directory, and you want "http://www.sitename.com/file" to
serve the same page as "http://www.sitename.com/file.php".
Multiviews _may_ do this, but be aware that it is dependant
on the contents of the directory in question.
If you also had a file "file.php.old"(e.g. a prior version
of "file.php") in the same directory, you may find that with
Multiviews enabled Apache serves it instead, so a request for
"http://www.sitename.com/file" actually gets sent
"http://www.sitename.com/file.php.old".
The problems:
- the client's browser may show "http://www.sitename.com/file",
so they don't know they just received a different file than
what they thought they were asking for
- in your example of a PHP file, the client may be looking at
your PHP source, because the extension ".old" on the file
doesn't resolve to a known Mime type, therefore the file
"file.php.old" gets served using the default Mime type, which
is usually 'text/plain', which means the client is now looking
at the PHP source contained in "file.php.old"
Dave
------------------------------------------------
To reply via email, edit my email address first.