开发者

Orchard CMS- Configure Base URL

开发者 https://www.devze.com 2023-04-11 06:34 出处:网络
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.

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.


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


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.

0

精彩评论

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

关注公众号