-1

I'm really new with Sitecore and I'm not sure where to perform this change. So far I only know the CMS web interface which is very limited. How can I locate the web.config file? What tool should I use? Should I connect Visual Studio with the site or should I perform a remote desktop connection?

Thank you so much for your help in advance.

2 Answers 2

0

For location, just open IIS, locate your website and in the right pane click explore.

enter image description here

Just to get your started down the right path, you never ever want to edit the web.config directly. You want to use a tool like SlowCheetah and transform your web.config, adding/removing what you need. If you edit it directly, it makes upgrading and deploying more difficult. Below I believe is the transform you are looking for.

<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">  
    <system.webServer>
      <httpErrors errorMode="Custom" existingResponse="Auto" xdt:Transform="Replace">
            <remove statusCode="403" />
            <remove statusCode="404" />
            <remove statusCode="500" />
            <error statusCode="500" responseMode="Redirect" path="/500.html" />
            <error statusCode="403" responseMode="Redirect" path="/404.html" />
            <error statusCode="404" responseMode="Redirect" path="/404.html" />
        </httpErrors>
    </system.webServer>
</configuration>
0

Go to IIS where your website is hosted and running. Open your website in explorer and you should be able to locate web config file. Path may look like below.

~\WWWRoot\"YourSiteInstance"\

Alternatively, You can have a look at all the configs by running below link in the browser.

https://"YourSiteInstance"/sitecore/admin/showconfig.aspx

To setup 404, visit below link

How do you setup a 404 and 500 error page for missing files and media items?

1
  • This has been really helpful, thank you so much. Nov 20, 2018 at 14:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.