Sub Domain / URL Rewrite in IIS / css and js files?

Discussion in 'General troubleshooting' started by Rob Meade, Sep 8, 2012.

  1. Hi there,

    I have created a sub domain on my account called "test". As per most other people here my hope was to create:

    http://test.mydomain.com and have that appear in the browser, as opposed to:

    http://test.mydomain.com/test

    anyway... having done a little search on here I found an older article that I've subsequently lost (gah!) which covered the IIS 7 Manager install and the configuration of URL Rewrites on the server. I have done this and at the moment it appears to work, kinda...

    The problem is, the relative links on the page to both css and js files do not seem to getting used, eg, my page looks awful! I have tried browsing directly to the file and it prompts me to open them... so for example:

    http://test.mydomain.com/mypage.aspx - renders badly because it cant accces

    /js
    /css

    however, if I directly browse to
    http://test.mydomain.com/js/somefile.js IE prompts me to open it...

    Can anyone shed any light on this please? The obvious fix would be to use absolute paths in the references in the markup, but I'd rather not... I'm guessing there's a step or something I've missed that I needed to configure?

    Any help appreciated..

    Kind regards

    Rob
     
  2. Last edited by a moderator: Oct 14, 2015
  3. in fact... it looks like its just the CSS thats the problem...

    when I View Source on the rendered page, the two references to the css files have had test/ put in front of them, the JS paths havent... the javascript on the page appears to be working correctly... but the layout/colours etc are all wrong...

    Any ideas?
     
  4. ComputerMan

    ComputerMan Winhost Staff

    Yup, it does sound like a CSS problem to me by what you are describing. I would suggest that you connect to your site with a FTP client and then make sure the CSS files exist where the page is referencing them.

    If the page is referencing them in the wrong place. Then change the code to the correct path of where the CSS files are located on your directory.
     

Share This Page