Files with out extensions..

Files with out extensions..

Post by Ectoma » Sun, 17 Feb 2002 12:40:17



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

Thanks,
AJ Quick (Ectoman)

 
 
 

Files with out extensions..

Post by Joshua Sliv » Sun, 17 Feb 2002 22:27:03



Quote:> 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.)

--
Joshua Slive

Apache HTTP Server Users Mailing List: http://httpd.apache.org/userslist.html

 
 
 

Files with out extensions..

Post by Dave Patt » Mon, 18 Feb 2002 04:19:20





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

 
 
 

Files with out extensions..

Post by Ectoma » Wed, 20 Feb 2002 01:23:25


 Thanks Guys.

--
AJ Quick (Ectoman)

 
 
 

1. Custom file extensions with Apache/frontpage98 extensions

hi everyone,

I am using Apache 1.2.4 on solaris with frontpage extensions 3.0.
I want to save web pages with file extension .phtml. Those pages contain
frontpage stdio bots (implemented in perl), which should be expanded when
the page is saved.
However, when I save a .phtml page, the perl script implementing the bot is
not executed. It will be if I change the file extension to a more standard
one (.htm,.html,.htx...).
There must be a way to let the frontpage extensions know about custom file
extensions. does anybody know how to do this?
By the way, I did declare the .phtml file extension as text/html in the
Apache srm.conf file.

Thanks
Herve Ganem
Schlumberger GeoQuest

2. Cat 6 cable - Home made problem

3. Help - Sending binary file by CGI (file extension problem in "i.e.")

4. PostgreSQL Version 6.0 RDBMS database ANSI SQL 92 compliant - Its FREE!!

5. Excluding file with given extension from a tar file

6. EtherExpress PRO/100 PCI

7. RHL7.0 and PHP4: Apache config file problem: file extensions

8. Q: Acces rights to a directory...

9. How to change the file extension of a buch of files?

10. changing file extension of multiple files

11. Sending binary file by CGI (file extension problem in "i.e.")

12. Changing file extension .pk to .300pk for all files

13. How do I perserve file extensions when a file is downloaded