Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • slowseer 5 posts 75 karma points
    Nov 06, 2015 @ 01:09
    slowseer
    0

    Umbraco on subdomain shows subfolders in urls (godaddy)

    Hello!

    Environment: Godaddy shared hosting. I have the folder set as application root.

    I have umbraco 7 installed on a godaddy subdomain, and everything is working great except for the URLs.

    My site is installed in /root/projects/website, and I have a subdomain pointed to the website folder, but when I visit the subdomain all links (generated using NiceURL(pageid)) also include the folders, like this:

    website.example.com/projects/website/page

    instead of this:

    website.example.com/page

    SO! I thought maybe It's an MVC routing issue, I installed a base 2015 MVC project onto a subdomain and noticed that it did the exact same thing! After some googling i came across a web.config rewrite rules solution that fixed it for my MVC project, but unfortunately the same solution did not work for my Umbraco installation.

    The incompatible mvc solution was to add this to the system.webserver node of my web config:

    <rewrite>
      <rules>
        <rule name="Remove Virtual Directory">
          <match url=".*" />
          <action type="Rewrite" url="{R:0}" />
        </rule>
      </rules>
    </rewrite> 
    

    Is there something similar I can do with my umbraco site?

    Any help appreciated. Thank you.

  • slowseer 5 posts 75 karma points
    Nov 06, 2015 @ 20:06
    slowseer
    0

    I noticed there is a url rewriter that is already hooked up in the umbraco installation, would I be able to create some kind of rule that does this in the urlrewriter.config?

Please Sign in or register to post replies

Write your reply to:

Draft