Apache regular expression help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • psili
    Confirmed User
    • Apr 2003
    • 5526

    #1

    Apache regular expression help

    I'm retarded and can't get the correct regular expression for a LocationMatch directive in apache-- if anyone could throw it down, I'd much appreciate it:

    The URI must begin with either "index.html" or [0-9]{1,5}, else deny it.

    I've tried

    Code:
    ^/!(index\.html|[0-9]{1,5})
    
    ^/([^0-9].*)|!(index\.html)
    
    etc, etc.
    any ideas ?
    Your post count means nothing.
  • Tom_PM
    Porn Meister
    • Feb 2005
    • 16443

    #2
    I dont know, but heres a link to check syntax and a bump.
    http://httpd.apache.org/docs/1.3/mod...#locationmatch
    43-922-863 Shut up and play your guitar.

    Comment

    • psili
      Confirmed User
      • Apr 2003
      • 5526

      #3
      Fuck it, found a work around with mod rewrite

      Code:
              RewriteEngine On
              RewriteRule !^/[0-9]|index - [F]
      Thanks PR_Tom for the bump, though.
      Your post count means nothing.

      Comment

      Working...