I'm having a weird redirect problem on my local server. I have a VirtualHost set up:
NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "/Users/iMac/Sites/index.php" ServerName jordan.local ErrorLog "/private/var/log/apache2/jordan.local-error_log" CustomLog "/private/var/log/apache2/jordan.local-access_log" common <Directory "/Users/iMac/Sites/index.php"> AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
http://jordan.local works fine. However, when I attempt to access a subdirectory
jordan.local/somefolder/index.php, the page shown is
jordan.local/index.php. I do not have an .htaccess file and have restarted apache numerous times.
Apache version: 2.2.22 (Unix)
Mac OS X 10.7.5
Here's my host file if it's any help:
127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost fe80::1%lo0 localhost #188.8.131.52 gs.apple.com 127.0.0.1 jordan.local
All of the local URL's I accessed (that are non-existent) showed up in my custom access logs as a 200 response code.
My Apache error logs are giving this warning:
Warning: DocumentRoot [/Users/iMac/Sites/index.php] does not exist
/Users/iMac/Sites/index.php is a valid path.
Please let me know if you need any more information.