Page is a not externally linkable
- Code, Content, and Presentation
-- Apache Web Server
---- A Close to perfect .htaccess ban list - Part 2


jdMorgan - 10:48 pm on May 21, 2003 (gmt 0)


Wizcrafts,

No, just
RewriteRule .* - [F]
will do - there is no need to start- or end-anchor a pattern which is completely wild-carded.

What I was talking about above is this:
^somepattern.*$
can just as easily be written
^somepattern

-and-
^.*somepattern$
can be shortened to
somepattern$

There is no need to anchor a pattern if the characters adjacent to that anchor are wild-cards. Fewer unneeded characters means smaller files and faster regex processing.

Ref: A concise Regular Expressions Tutorial [etext.lib.virginia.edu]

HTH,
Jim


Thread source:: http://www.webmasterworld.com/apache/205.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com