: Apache, Rewrite Rule and Directories I'm using the current virtual host: <VirtualHost *:80> ServerAdmin webmaster@mysite ServerName example.co.uk ServerAlias www.example.co.uk
I'm using the current virtual host:
<VirtualHost *:80>
ServerAdmin webmaster@mysite
ServerName example.co.uk
ServerAlias example.co.uk DocumentRoot /home/example.co.uk/htdocs/
<Directory /home/example.co.uk/htdocs/>
Options -Indexes FollowSymlinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/example.co.uk/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/example.co.uk/access.log combined
</VirtualHost>
Within the .htaccess in the root I'm using RewriteRule ^enquiries$ /enquiries.php amoung several other redirects.
Somehow I have also a directory named "enquiries" (/home/example.co.uk/htdocs/enquiries/), and when I hit the URL example.co.uk/enquiries I get:
HTTP/1.1 301 Moved Permanently
Date: Mon, 10 Dec 2012 18:53:37 GMT
Server: Apache/2.2.16 (Debian)
Location: www.mysite.co.uk/enquiries/ Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1
Any browser would also display the directories content. I could easily rename the folder and get it sorted, but I would like to understand what's going on here. What would be the correct way to configure Apache in a way that it wont behave this way?
If I did not explain myself clearly, please feel free to ask more questions, I'd be happy to answer them. Thanks!
More posts by @Gretchen104
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.