Re: Not found regex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 just opposite. Need your help here.
RewriteRule .* https://%{HTTP_HOST}/ [L]

Hope this helps to understand the problem.

Best Regards
Manoj Singh

On Mon, Aug 4, 2008 at 8:24 PM, Yeti <yeti@xxxxxxxxxx> wrote:

> <?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 <manojsingh2121@xxxxxxxxx>
> wrote:
> > Hello All,
> > I have to create the regular expression to allow all the file extensions
> > except the specified extension.
> >
> > Suppose I want to allow extensions with php, so the regex is: ^.+\.php$
> >
> > But here i need the regex which allows all the extensions except php.
> >
> >
> > I will appreciate any help.
> >
> > Best Regards,
> > Manoj Kumar Singh
> >
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux