GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Apache regular expression help (https://gfy.com/showthread.php?t=504326)

psili 08-16-2005 10:47 AM

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 ?

Tom_PM 08-16-2005 11:58 AM

I dont know, but heres a link to check syntax and a bump.
http://httpd.apache.org/docs/1.3/mod...#locationmatch

psili 08-16-2005 12:10 PM

Fuck it, found a work around with mod rewrite

Code:

        RewriteEngine On
        RewriteRule !^/[0-9]|index - [F]

Thanks PR_Tom for the bump, though. :)


All times are GMT -7. The time now is 12:08 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123