« Previous Next »

Thread: Htaccess in IIS

Last post 07-02-2009 1:40 PM by iis_usr. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 07-01-2009, 5:34 PM

    • iis_usr
    • Not Ranked
    • Joined on 07-01-2009, 5:33 PM
    • Posts 2

    Htaccess in IIS

    Hello,

    I have a website that's recently been migrated from Linux/Apache to Windows/IIS. It's a rather basic php/mysql system and we've only encountered one issue so far.

    This site has a members-only directory which requires a login (handled by php) for access. When the site was developed, a .htaccess file was used to limit access to items in that folder. Basically the .htaccess file instructed the web server to require users to login through auth.php when they attempted to access files with a certain extention.

    Here is a copy of the .htaccess file:

    --- begin ---

    AddHandler admin .jpg
    AddHandler admin .gif
    AddHandler admin .png
    AddHandler admin .tiff
    AddHandler admin .bmp
    AddHandler admin .txt
    AddHandler admin .rtf
    AddHandler admin .doc
    AddHandler admin .docx
    AddHandler admin .docm
    AddHandler admin .dotx
    AddHandler admin .dotm
    AddHandler admin .xls
    AddHandler admin .xlsx
    AddHandler admin .xlsm
    AddHandler admin .xltx
    AddHandler admin .xltm
    AddHandler admin .xlsb
    AddHandler admin .xlam
    AddHandler admin .ppt
    AddHandler admin .pptm
    AddHandler admin .potx
    AddHandler admin .potm
    AddHandler admin .ppam
    AddHandler admin .ppsx
    AddHandler admin .ppsm
    AddHandler admin .pdf
    AddHandler admin .3gp
    AddHandler admin .asf
    AddHandler admin .asx
    AddHandler admin .avi
    AddHandler admin .mov
    AddHandler admin .mp4
    AddHandler admin .mpg
    AddHandler admin .qt
    AddHandler admin .rm
    AddHandler admin .swf
    AddHandler admin .wmv
    AddHandler admin .aac
    AddHandler admin .aif
    AddHandler admin .iff
    AddHandler admin .m3u
    AddHandler admin .mp3
    AddHandler admin .mpa
    AddHandler admin .ra
    AddHandler admin .ram
    AddHandler admin .wav
    AddHandler admin .wma
    AddHandler admin .zip

    Action admin /members-only/auth.php

    --- end ---

    I've seen plenty of discussions around the 'net which address migrating a htaccess file to IIS; however, none of them address the usage of AddHandler in a htaccess file.

    Would anyone here be able to point me towards any method which would allow this very simple system to continue working under IIS?

    Thanks!

  • 07-02-2009, 10:20 AM In reply to

    Re: Htaccess in IIS

     I don't know of anything that in IIS/windows so you can have a challenge for an extension.

  • 07-02-2009, 1:40 PM In reply to

    • iis_usr
    • Not Ranked
    • Joined on 07-01-2009, 5:33 PM
    • Posts 2

    Re: Htaccess in IIS

    I see my thread was moved, this really isn't a PHP problem however; it's an IIS issue. IIS has the ability to translate some Apache htaccess functions, an issue that has probably been discussed here in depth within other forum areas.

    The htaccess function I'm trying to recreate is not one that's been discussed before. Moderators, can we move this thread to an appropriate forum? This is an IIS configuration issue, thanks.

Page 1 of 1 (3 items)