Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

.htaccess & regex

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  A2.0 causing page-lock crashes under W2K?  
Author Message
nospam218

External


Since: Jun 29, 2004
Posts: 4



(Msg. 1) Posted: Tue Jun 29, 2004 10:07 pm
Post subject: .htaccess & regex
Archived from groups: alt>apache>configuration (more info?)

This .htaccess works:

<FilesMatch "\.inc$">
Order allow,deny
Deny from all
</FilesMatch>

But this will not:

<FilesMatch "\.inc$ [NC]">
Order allow,deny
Deny from all
</FilesMatch>

Why is the [NC] flag causing the regex not to work? Not working means
Apache doesn't recognize the regex. Nothing I do will make the [NC]
work. I'm using Apache 1.3.

 >> Stay informed about: .htaccess & regex 
Back to top
Login to vote
spam3

External


Since: Jul 01, 2003
Posts: 411



(Msg. 2) Posted: Tue Jun 29, 2004 10:37 pm
Post subject: Re: .htaccess & regex [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jon wrote:
 > <FilesMatch "\.inc$ [NC]">
 >
 > Why is the [NC] flag causing the regex not to work? Not working means
 > Apache doesn't recognize the regex. Nothing I do will make the [NC]
 > work. I'm using Apache 1.3.

Never used regex outside of mod_rewrite, and I don't see anything about
flags for FilesMatch, but you could try something like:

<FilesMatch "\.[iI][nN][cC]$">

--
Justin Koivisto - spam RemoveThis @koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: .htaccess & regex 
Back to top
Login to vote
nospam218

External


Since: Jun 29, 2004
Posts: 4



(Msg. 3) Posted: Tue Jun 29, 2004 10:50 pm
Post subject: Re: .htaccess & regex [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Justin Koivisto wrote:
 > Jon wrote:
 >
  >> <FilesMatch "\.inc$ [NC]">
  >>
 >
 >
 > Never used regex outside of mod_rewrite, and I don't see anything about
 > flags for FilesMatch, but you could try something like:
 >
 > <FilesMatch "\.[iI][nN][cC]$">
 >

Thanks, that works. Why do you suggest not using regex with <FilesMatch>?<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess & regex 
Back to top
Login to vote
spam3

External


Since: Jul 01, 2003
Posts: 411



(Msg. 4) Posted: Wed Jun 30, 2004 12:52 am
Post subject: Re: .htaccess & regex [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jon wrote:

 > Justin Koivisto wrote:
 >
  >> Jon wrote:
  >>
   >>> <FilesMatch "\.inc$ [NC]">
  >>
  >> Never used regex outside of mod_rewrite, and I don't see anything
  >> about flags for FilesMatch, but you could try something like:
  >>
  >> <FilesMatch "\.[iI][nN][cC]$">
 >
 > Thanks, that works. Why do you suggest not using regex with <FilesMatch>?

??? I didn't say that.

--
Justin Koivisto - spam.DeleteThis@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess & regex 
Back to top
Login to vote
nospam218

External


Since: Jun 29, 2004
Posts: 4



(Msg. 5) Posted: Wed Jun 30, 2004 3:27 am
Post subject: Re: .htaccess & regex [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Justin Koivisto wrote:
 > Jon wrote:
 >
  >> Justin Koivisto wrote:
  >>
   >>> Jon wrote:
   >>>
   >>>> <FilesMatch "\.inc$ [NC]">
   >>>
   >>>
   >>> Never used regex outside of mod_rewrite, and I don't see anything
   >>> about flags for FilesMatch, but you could try something like:
   >>>
   >>> <FilesMatch "\.[iI][nN][cC]$">
  >>
  >>
  >> Thanks, that works. Why do you suggest not using regex with <FilesMatch>?
 >
 >
 > ??? I didn't say that.
 >

Why did you say "Never used regex outside of mod_rewrite"?<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess & regex 
Back to top
Login to vote
nospam218

External


Since: Jun 29, 2004
Posts: 4



(Msg. 6) Posted: Wed Jun 30, 2004 3:28 am
Post subject: Re: .htaccess & regex [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Jon wrote:

 > Justin Koivisto wrote:
 >
  >> Jon wrote:
  >>
   >>> Justin Koivisto wrote:
   >>>
   >>>> Jon wrote:
   >>>>
   >>>>> <FilesMatch "\.inc$ [NC]">
   >>>>
   >>>>
   >>>>
   >>>> Never used regex outside of mod_rewrite, and I don't see anything
   >>>> about flags for FilesMatch, but you could try something like:
   >>>>
   >>>> <FilesMatch "\.[iI][nN][cC]$">
   >>>
   >>>
   >>>
   >>> Thanks, that works. Why do you suggest not using regex with
   >>> <FilesMatch>?
  >>
  >>
  >>
  >> ??? I didn't say that.
  >>
 >
 > Why did you say "Never used regex outside of mod_rewrite"?
 >
 >
I'm sorry, I was reading "used" as "use", sorry! Sad<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: .htaccess & regex 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Rewrite - Regex compilation error. - Running Apache/1.3.20 (Win32) Get regex compilation error with C:\apache -t Syntax error on line 979 of httpserver/conf/httpd.conf: RewriteCond: cannot compile regular expression '^/(?!(\w+))' Works with Tcl/Perl regex compiler. % regexp..

[Regex] Apache / proxy / mod_rewrite - HEllo, I would like to write a regex for mod_rewrite in order to replace all "?" by "!". Do you think it's possible ? I need this because i've got a lot of problems with Apache + proxy + rewrite + ssl when my target server is Domino...

.htaccess: why??? - Hi. Sorry for my english, but I don't know it very well. I have a problem with .htaccess. My file .htaccess is this: ====BEGIN======== AddType text/plain .log =====END========= I made it because my apache web server (provider aruba) associate to .log....

htaccess & SSL - I would like to control with htaccess the acces for one directory of my site. But I don't know how to configure my htaccess to limit the access from "https://". Thank's Edz ...

htaccess with SQL - Hi, I have a problem (well more than one), I want to use htaccess to allow users in an MySQL database to gain access to the specified directory only when there authorization in the database is good. e.g. person1 when with authorization level 1 gains no..
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]