Welcome to WebmasterWorld Guest from 220.127.116.11
I am pulling my hair out...well...what I have left up there somewhere trying to figure out why Apache is behaving as it is and would appreciate any insight from anyone on this problem. I have been at it for several hours and for the life of me can't figure this out.
I have a bunch of text files in my public directory. These text files end in the extension .txt All well and good. These files get spit out as web pages by some PHP scripts that I have.
Okay that's the background.
Now when I enter a URL like <some domain>/home for example Apache pulls up the <some domain>/home.txt file. If I enter <some domain>/about-me it pulls up the <some domain>/about-me.txt file and displays the plain text contents on the screen.
I have no .htaccess file (I renamed it while trying to create some mod_rewrite rules that led me to realize this was happening).
This is a test server so none of the usual cautions apply here as to what I am doing.
Why does Apache insist on adding an extension to my URL's?
I think it has something to do with a default mime but I can't seem to find anything on this yet and would appreciate some input.
How to I tell Apache not to assume anything and only pull up what is explicitly indicated in the URL and nothing else?
This is the most-likely fix, based on what you wrote. If you can't or don't want to do this, ask your host to do it for you, either in .htaccess or in the server config file.
Note that .htaccess must be a plain-text file, so use a simple plain-text editor such as Microsoft Notepad to create or edit the file, not a word-processing program or an HTML editor!
I managed to figure out with another hour or two of digging around. It was indeed MultiViews! I turned it off and presto...the text files stopped being served up unless I explicitly put the full name (with extension) in the URL.
I apparently disabled MultiViews a long time ago at my web hosting provider (unless they did) because after I was done with changes to my site locally and uploaded them to my server...it worked just fine.
Thanks again! Your input is much appreciated.