RE: [PHP] Not found regex

2008-08-04 Thread Wei, Alice J.
From: Manoj Singh [EMAIL PROTECTED] Sent: Monday, August 04, 2008 10:44 AM To: php-general@lists.php.net Subject: [PHP] Not found regex Hello All, I have to create the regular expression to allow all the file extensions except the specified extension. Suppose I want to allow

Re: [PHP] Not found regex

2008-08-04 Thread Yeti
?php $file = '/example/hello.php'; $info = pathinfo($file); $not_allowed = array('php', 'pt', 'exe'); if (!in_array(strtolower($info['extension']), $not_allowed)) { // do something } // why use a regex? ? On Mon, Aug 4, 2008 at 4:44 PM, Manoj Singh [EMAIL PROTECTED] wrote: Hello All, I have to

Re: [PHP] Not found regex

2008-08-04 Thread Manoj Singh
Hi All, Thanks for your replies. Actually i am placing this regex in .htaccess file. Here i have to redirect all the request to https if it is not for ogg file. The complete code is: RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} ^.+\.ogg$ //Need some tweaking here. I know this code works

Re: [PHP] Not found regex

2008-08-04 Thread Shawn McKenzie
Manoj Singh wrote: Hi All, Thanks for your replies. Actually i am placing this regex in .htaccess file. Here i have to redirect all the request to https if it is not for ogg file. The complete code is: RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} ^.+\.ogg$ //Need some tweaking here. I

RE: [PHP] Not found regex

2008-08-04 Thread Boyd, Todd M.
-Original Message- From: Shawn McKenzie [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2008 10:33 AM To: php-general@lists.php.net Subject: Re: [PHP] Not found regex Manoj Singh wrote: Hi All, Thanks for your replies. Actually i am placing this regex in .htaccess file

Re: [PHP] Not found regex

2008-08-04 Thread Shawn McKenzie
Boyd, Todd M. wrote: -Original Message- From: Shawn McKenzie [mailto:[EMAIL PROTECTED] Sent: Monday, August 04, 2008 10:33 AM To: php-general@lists.php.net Subject: Re: [PHP] Not found regex Manoj Singh wrote: Hi All, Thanks for your replies. Actually i am placing this regex