I'm using a simple .htaccess to handle everything with a PHP script:
RewriteEngine on
RewriteRule . index.php
My index.php just echoes server variables at the moment (with a
print_r($_SERVER)
); Everything works fine, I type anything in the URL
and the index.php contents are shown. However, considering this
structure:
test/ # document root
folder/ # empty folder
index.php
.htaccess
I noticed that accessing [site]/folder
first redirects the browser to
[site]/folder/
and then shows the proper index.php contents. Why is
this happening? Isn't the rewrite rule supposed to redirect everything
"as is"?
This is being used with virtual host set up to test a website locally. Configured with the bare minimum. Could there be other apache files being loaded prior to my .htaccess?
<VirtualHost *:80>
ServerName test.local
DocumentRoot /Library/WebServer/Documents/test/
</VirtualHost>
Using OS X 10.10 currently.