除非目录名以下划线开头,否则不会显示图像

I'm setting up a gallery. Images are inside a directory called 'gallery' on my localhost. Same thing for for my host server (1and1).

So, the issue is that when the actual directory is named 'gallery' the images don't display. But, when I rename the directory with an underscore such as: _gallery the images display properly.

The code that is suppose to work is a simple straight-up html code, but no dice:

<div class="client-gallery">
    <img src="gallery/picture-01.jpg" />
</div>

So, in order for it to display the images, I have to create the directory as "_gallery" and of course the code:

<div class="client-gallery">
    <img src="_gallery/picture-01.jpg" />
</div>

I'm thinking it may be something to do with my Rewrites:

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^project-details/([a-zA-Z0-9-]+)/ project-details.php?pn=$1 [NC,L]
Rewriterule ^([a-zA-Z0-9-]+)/ $1.php [NC,L]
</IfModule>

I could just leave the directory as _gallery, but that doesn't let me know what the heck is going on with the file. Any help is greatly appreciated.

The set up is your basic set up. The files have a basic PHP include_once callers since I separated the header, footer, jscripts, etc. Other than that...it's straight forward and frustrating I'm having a brain fart and unable to figure it out.

Thanks.

Well, it looks like moving the culprit line to be the first RewriteRule it fixed the issue with the directories. Thank you everyone for helping me debug this issue!