0

I have Asp.Net project. My project physical path structure as /htdocs/site1/...

I would like to change this url request as /site1/...

I have put below codes into to webconfig but it is not working. Currently IIS 8 rewrite extension installed on web server

 <system.webServer>
    <rewrite>
      <rules>
        <rule name="htdocs_remove">
          <match url="/htdocs/site1/" />
          <action type="Rewrite" url="/site1/" />
        </rule>
      </rules>
    </rewrite>
 </system.webServer>
Kerberos
  • 331
  • 1
  • 11
  • Is "htdocs" actually in your site url i.e. `http://example.com/htdocs/site1` ? – Kev Nov 21 '18 at 13:17
  • @Kev basically I am getting widget page into parent page in **site1** folder like this **@RenderPage("/htdocs/widgets/page1.cshtml")** my actually url is http://example.com/htdocs/site1/index.cshtml – Kerberos Nov 21 '18 at 14:15

1 Answers1

-1

Restart IIS and try again. If it fails to work then follow this ref-1 and ref-2.

A.M Codex
  • 1
  • 2