Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I'm using the current virtual host:

<VirtualHost *:80>
    ServerAdmin webmaster@mysite
    DocumentRoot /home/
    <Directory /home/>
            Options -Indexes FollowSymlinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    ErrorLog ${APACHE_LOG_DIR}/
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/ combined

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/, and when I hit the URL I get:

HTTP/1.1 301 Moved Permanently
Date: Mon, 10 Dec 2012 18:53:37 GMT
Server: Apache/2.2.16 (Debian)
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!

share|improve this question
Are you saying that you cannot view the folders contents because the rewrite is catching the word enquiries and creating an endless loop? – Anagio Dec 10 '12 at 22:57
No, I am saying I cannot redirect from a path that has the same name of a directory. No loops happens, I just see the content of the directory instead of seeing the correct file that apache should redirect to – milo5b Dec 11 '12 at 15:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.