Using the URL Rewrite module and BlogEngine.net

Discussion in 'Site Programming, Development and Design' started by dcbrune, Apr 2, 2010.

  1. Ok, call me stupid, but I'm out of ideas. I just opened a hosting account with Winhost and I've got 2 domains pointing here.

    The main domain I opened the site for is brunesplace.com. The second domain name that I have pointed here is davesramblings.com.

    Now while I work on getting brunesplace.com up and running, I wanted to get my blog site moved over and running since I'm coming from WebHost4Life (what a nightmare). I want my blog to run under davesramblings.com.

    Anyway, I know that both of my domains are pointing to the root of my site, and I've verified that by trying to access both domains names from my browser and they bring up the Winhost new account page.

    Now I wanted to get my blog installed, like I said it's BlogEngine.net. So I created a folder called RamblingsBlog and copied all the files to there. I then set that folder up as an application.

    I then used the IIS console to create a URL rewrite rule that I hoped would take www.davesramblings.com to the folder RamblingsBlog. It works, the site runs, but not perfectly. Some of the images do not display, the admin pages don't work, etc.

    What I'm seeing on the login page that does not work, is the error saying page X cannot be found at "/RamblingsBlog/RamblingsBlog/login.aspx".

    On the images, when I look at the HTML in the browser, I see something like this: "http://www.davesramblings.com/ramblingsblog/pics/rssButton.gif". Which looks right, however, when putting that URL in the browser I get this error: "http://www.davesramblings.com:80/RamblingsBlog/RamblingsBlog/pics/rssButton.gif"

    It's obvious that somehow the RamblingsBlog name is being inserted twice, but I have no clue why. I think the URL rewrite rules are correct, but obviously something is wrong.

    So after this long sad story, any help anyone can offer would be greatfully appreciated.

    Thanks
     
    Last edited by a moderator: Oct 14, 2015
  2. Ray

    Ray

    Did you fix your problem? I pulled up your site www.davesramblings.com and everything appears to be working correctly.
     
  3. I believe I did fix my problem, but it was by pure accident.

    This URL rewrite module from MS is not exactly the most friendly tool they have ever developed. Anyway, what I did was I created a rule in the root of my site to direct all requests for www.davesramblings.com to a folder I created call RamblingsBlog. I then created another rule, but this time at the RamblingsBlog folder level, that looks at the request, and removes the /RamblingsBlog/ on the url is it is present.

    This fixed it. I don't know if it's the correct way to do it, but it works. I still don't understand why the one rule caused the folder name to get appended twice to the URL.
     
  4. Ray

    Ray

    Typically the redirect and rewrite rule is set on the root. I'm not sure how your application is setup. Let us know if this happens again.
     
  5. Another question, related to all of this. Originally I had this blog registered as blog.davesramblings.com and davesramblings.com was going to be something else.

    Since moving, I'm never going to do anything else with davesramblings.com, so I just made it my blog site, but for those that still have the URL blog.davesramblings.com, I would like it to redirect, whereas right now it just shows a site not found error.

    So, now that I have davesramblings.com working with the URL rewrite stuff, how can I go about setting up something so that blog.davesramblings.com directs to the same place? I'm assuming it would be a DNS thing, but I don't understand the whole DNS stuff that much.
     
  6. Ray

    Ray

    You will need to also add blog.davesramblings.com as a domain pointer so that our system will create a header entry for this subdomain name.

    You may also need to create another rule but this time specifying blog.davesramblings.com. The rule should be the same as davesramblings.com.
     
  7. Awesome, that did the trick, Thank you very much.

    Also, I noticed today that MS has released an update to the URL rewrite module, version 2.0 is supposed to fix some problems and make it a bit easier to setup rules. Will this be something Winhost will be upgrading too?

    I understand it would have to be tested and such, just curious.

    Thanks again for all your help with this.
     
    Last edited by a moderator: Oct 14, 2015
  8. Ray

    Ray

    Yes its in discussion by our management and development team. I'm afraid I will not be able to give you a specific date of roll out. I'm sure once they have made a decision they will post it on the forum.
     

Share This Page