Welcome to WebmasterWorld Guest from 54.145.85.87

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

FilesMatch

.htaccess filesmatch

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

Junior Member

10+ Year Member

joined:Mar 25, 2003
posts:144
votes: 0


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.

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

Senior Member

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

joined:Mar 31, 2002
posts:25430
votes: 0


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

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members