Welcome to WebmasterWorld Guest from 54.226.25.231

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

FilesMatch

.htaccess filesmatch

     

TheWebographer

1:24 pm on Jun 25, 2003 (gmt 0)

10+ Year Member



This is in an .htaccess file:

<FilesMatch "local¦district¦country">
forcetype application/x-httpd-php
</FilesMatch>

What would be the best regular expression to get it to work with ANY file name containing the words "local" or "district" or "country".

examples:

www.xyz.com/local-d4556
www.xyz.com/local-3aa45
www.xyz.com/cars/local-99345

etc for all 3 keywords in <FilesMatch>

Thank you in advance.

jdMorgan

10:01 pm on Jun 25, 2003 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



TheWebographer,

Since the regular-expressions patterns in the FilesMatch directive are not anchored with "^" or "$", they should match no matter where in the requested pathname those words appear.

Unless I miss your point...

Jim

 

Featured Threads

Hot Threads This Week

Hot Threads This Month