开发者

Cannot browse to node/folder name without extension in Umbraco

I'm using IIS7 and Umbraco 4 to run a clients site but I'm having issues browsing to pages with extensionless URLS.

The site is running several languages which are separated by Umbraco Folders. What I want to do is use the primary domain (.com) for all sites and request a specific one using the abbreviated country name i.e. mydomain.com/es (for spanish site). The trouble is I can only access the page by using the .aspx extension i.e. mydomain.com/es.aspx and without the extension i get a 404 error.

It's been suggested that I add the page I am requesting as a default dosument in IIS but this has not worked.

I've also tried setting t开发者_开发技巧he "umbracoHideTopLevelNodeFromPath" value to false but this makes no difference.

The system will be migrated to the clients servers once complete so I don't really want to add URL rewriting rules within IIS so is there anything I've missed which will allow me to do this?

Thanks


so, you want to browse with directory url's then, this is very mutch possible.

first, open your web.config find the line below, and make sure the value is set to true

<add key="umbracoUseDirectoryUrls" value="true" />

then, you will need to add a wildcard mapping in IIS

the steps you will need to take in IIS7 are explained in this post: [http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/][1]

and if you would ever need to do this on IIS6

  • Open IIS6
  • Right click on your website
  • Select Properties
  • Click the home directory tab
  • Click Configuration
  • On the mappings tab, click the Insert button, next to the wildcard mappings box
  • Click Browse and find the aspnew_isapi.dll, this can usually be found here: c:\windows\microsoft.net\framework\v2.0.50727\aspnet_isapi.dll
  • Untick verify that file exists and click OK
  • Click OK
  • Click OK
  • Done

  • [1] : http://learn.iis.net/page.aspx/508/wildcard-script-mapping-and-iis-7-integrated-pipeline/


I know I'm a bit late in this one but if you want to have a directory NOT handled by Umbraco, try editing your web.config. Under the node, append your folder name to the existing value for umbracoReservedPaths. After the application restarts, you should be able to enter your folder and it will bypass the Umbraco handler.

<configuration>
 ...
  <appSettings>
   <add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/MyFolderName/" />
  </appSettings> 
 ...
</configuration>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜