« Previous Next »

Thread: How do you set a redirect on a single file?

Last post 01-08-2009 1:54 PM by rlucero. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 01-08-2009, 12:51 PM

    How do you set a redirect on a single file?

    I tried this and got an error.  I can set redirects on directories without any problems.  What syntax am I missing?

     

    %systemroot%\system32\inetsrv\APPCMD set config "Autodiscover Redirect/autodiscover/autodiscover.xml" /section:httpredirect -enabled:true  -destination:https://blahblah/autodiscover/autodiscover.xml -exactDestination:true -childonly:false -httpResponseStatus:Permanent

    Returns error:

    ERROR ( hresult:80070003, message:Failed to commit configuration changes.
    The system cannot find the path specified.

  • 01-08-2009, 1:54 PM In reply to

    • rlucero
    • Top 50 Contributor
    • Joined on 09-29-2006, 3:35 PM
    • Seattle, WA
    • Posts 164

    Re: How do you set a redirect on a single file?

    Double check and make sure that your destination is wrapped in quotes. 

    Or try something like this:

    appcmd.exe set config "YourSite/Document" -section:system.webServer/httpRedirect /enabled:"True" /destination:"https..." /exactDestination:"True" /httpResponseStatus:"Permanent" /commit:"MACHINE/WEBROOT/APPHOST/YourWebSite"

Page 1 of 1 (2 items)
Microsoft Communities