homepage Welcome to WebmasterWorld Guest from 54.197.147.90
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
FilesMatch
.htaccess filesmatch
TheWebographer




msg:1497713
 1:24 pm on Jun 25, 2003 (gmt 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.

 

jdMorgan




msg:1497714
 10:01 pm on Jun 25, 2003 (gmt 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved