Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

formasfunction

macrumors newbie
Original poster
Aug 27, 2002
20
0
For some reason I can't seem to kill a rewrite in the local apache installation of Leopard. Here's what I've done so far:
I've created a new virtual host in httpd-vhosts.conf named test.dev
This is pointing to a folder at /Users/myusername/Sites/test
There is no .htaccess file in /test or /Sites
I've tried disabling MultiViews in the main httpd.conf
I've restarted Apache after each change

The current behavior I'm try to stop is as follows:
If I put foo.php in the root of test.dev, visiting test.dev/foo and test.dev/foo/ both access foo.php. As well, if I change foo.php to foo.html it can be accessed via test.dev/foo but not test.dev/foo/. I want to make it so there is no rewriting happening and these files can only be accessed by calling them directly (e.g. test.dev/foo.php or test.dev/foo.html).

Is there something in the default install that's causing this? How can I kill it?
 
There's a line in httpd.conf that defines what file name will be looked for by default for a directory. If you have somesite.com and go there it'll load a file even though one wasn't declared in the URL. The line in Apache tells it which files to look for and are generally in the form of;

Code:
DirectoryIndex   index.html index.htm index.shtml default.htm default.html index.php

Also look for lines that start with RewriteRule or RewriteCond.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.