Avaya Backup and Restore on IIS 7.5

IIS 7.5 does not support Anonymous webdav PUTS which is required by Avaya phones and to properly backup. However there is a solution.

This will only Work on IIS 7.5.

  1. Uninstall or Disable webdav on the website or virtual directory.
  2. Create a empty rewrite rule as follows
    1. Requested URL: Matches the Pattern
    2. Using: Wildcards
    3. Pattern: *.txt
    4. Action Type: Rewrite
    5. Rewrite URL: avayaupload.php
  3. Put the script below into avayaupload.php
<?php
if ($_SERVER['REQUEST_METHOD'] == "PUT")
{ $f = fopen(basename($_SERVER['REQUEST_URI']), "w");
  $s = fopen("php://input", "r");
  while($kb = fread($s, 1024))
  { fwrite($f, $kb, 1024); }
  fclose($f);
  fclose($s);
  Header("HTTP/1.1 201 Created"); }
elseif ($_SERVER['REQUEST_METHOD'] == "GET")
{ readfile(basename($_SERVER['REQUEST_URI'])); }

?>

You are going to need PHP installed. The easiest way is to install it from here http://www.microsoft.com/web/downloads/platform.aspx

Make sure your BRURI is set and your BRAUTH is 0. A quick test is to use curl from a unix or mac machine. curl -T test.txt http://avayabackupserver/backupdir test.txt will be uploaded to the server if everything is configured correctly.

 

*UPDATE

Please note that this was written for IIS 7.5 in 2008 r2 not for IIS 7.0 in 2008.

IIS ASP Redirect

This is a small asp script that will let you have alias in IIS with out having to make them in IIS. You can put this in a custom 404 page.

so in my site, if you go to http://www.stephenjc.com/google it will redirect you to google’s site.