Your localhost configurations (
unless changed in the vhosts file) are contained in the httpd.conf file, which you can check out for reference, and is why the .htaccess file can be accessed on localhost.
Add this to the <Directory> directive just below the
Options list, which you have omitted, but would perhaps need to be added at some later stage:
AllowOverride All
<VirtualHost *:80>
DocumentRoot "D:/source/example.com/htdocs"
ServerName example.com
<Directory "D:/source/example.com/htdocs">
Options Indexes +FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/example_com_error.log
CustomLog logs/example_com_access.log common
</VirtualHost>
Adding
AllowOverride All will permit .htaccess files to be parsed by the server on a directory by directory basis.
http://httpd.apache.org/docs/2.2/howto/htaccess.htmlhttp://httpd.apache.org/docs/2.3/mod/co ... owoverrideAlso note the error and access log entries have been edited as the dot may give issues.
This is incorrect
<VirtualHost _default_:80>and should be:
<VirtualHost *:80>which must match the
NameVirtualHost *:80 entry.
We are using an IP wild card
* here.
A reference quote from this link:
http://httpd.apache.org/docs/2.3/mod/co ... irtualhostArgument to <VirtualHost> directive
Note that the argument to the <VirtualHost> directive must exactly match the argument to the NameVirtualHost directive.