Orchard CMS- Configure Base URL

扶醉桌前 提交于 2020-01-04 02:47:08

问题


I installed the latest version of Orchard on my dev machine using a base url of localhost/frankgiotto. Then I moved the site to www.frankgiotto.com and updated my Base URL in the settings.

Site works perfectly. I love everything about it but the one thing is that all the links on every page are mapping to www.frankgiotto.com/frankgiotto/etc and I want simply www.frankgiotto.com/etc

This is driving me insane at the moment.. help anyone!?

p.s.. Yes, I made absolutely sure that Base Url is set to www.frankgiotto.com Interestingly enough, www.frankgiotto.com/Blog and www.frankgiotto.com/frankgiotto/Blog both work and take me to the same place. Its the same with everything else on the site.


回答1:


Yes, that is a known issue unfortunately. This is because for now links and image addresses are just stored as plain HTML in the database. Ideally, they would be stored as logical references instead and could be rebased on the production server. This feature does not exist today so what we encourage people to do is to use a port rather than a virtual directory on their dev box if they are going to deploy at the root of a domain. This way relative urls just work. In your case I'm afraid you'll have to manually rebase the existing links and change your dev box configuration.




回答2:


This is little out of context, but to make the orchard urls work without any issue on local just do the following

  • go to Web project
  • open property->Web
  • check for "virtual path", set it empty, and all will be fine

that will make the app run without "/", hence less chance for the above issue




回答3:


This sounds similar to my question : Orchard CMS Adding a links in HTML widget

Apologies if I'm stating the obvious, but have you checked the links in the content and the urls on the 'manage menu'.



来源:https://stackoverflow.com/questions/7670696/orchard-cms-configure-base-url

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!