Rewrite Paths AND File Paths Working Together

bv,

Oh, my! I believe that you are correct about Apache believing the URI is for a directory but I’ve never seen a case like this.

  1. Move -MultiViews up with the other Options at the top (and I believe that +FollowSymLinks should already be set in the server’s config file so I’d try eliminating that, too).

  2. I’m not sure what FileETag does (I’ll look it up later) but try commenting that line out.

  3. To combat the server’s adding the trailing / to your links, add as the FIRST RewriteRule set after RewriteEngine on:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(properties|neighborhoods)/([a-z-]+)/$ $1/$2 [L]
# OR flag of [R=301,L] for testing vitibility

For visual clarity, I separate my rule sets (RewriteCond and associated RewriteRule) from each other with an additional line) that would have shown you that the two RewriteCond statements at the end were without an associated RewriteRule.

Regards,

DK

1 Like