0

I have a website which is running fine locally, On the hosted domain it is placed in a sub folder.

Example:  

Localhost:1234/public/login.aspx

www.live.co.za/lsnew/public/login.aspx

The group hosting my site has put all my code in the file lsnew on the host domain. This has broken all my links.

I would like to add something in the web config i can turn on before hosting to add a sub directory to all my paths.

How do i add a default sub directory to follow the domain name?

I would like something similar to the web config defaultDocument, but instated of a page name i would like to have a default sub directory to follow my domain name.

Pomster
  • 14,567
  • 55
  • 128
  • 204
  • It's a bit unclear what exactly you're asking, but I think you can use URL rewriting. – CodeCaster Sep 15 '14 at 11:00
  • @CodeCaster Please see edit. I need help, even just so key words on what to look for. – Pomster Sep 15 '14 at 11:10
  • So, have you researched URL rewriting? – CodeCaster Sep 15 '14 at 11:11
  • @CodeCaster I'm looking through some links now, however i don't see anything looking like what i need. – Pomster Sep 15 '14 at 11:12
  • Then edit your question to show and explain what your site does now and how that is wrong. What does _"add a sub directory to all my paths"_ mean **exactly**? Are the URLs in your HTML like `/public/login.aspx` (including leading slash) and you want them to become `/lsnew/public/login.aspx`? – CodeCaster Sep 15 '14 at 11:15
  • @CodeCaster Yes i would like /lsnew added into my path's. I would also like it as a easy trigger to turn off and on. – Pomster Sep 15 '14 at 11:24
  • Does a site already exist at `/`? Did you try [IIS7 URL Redirection from root to sub directory](http://stackoverflow.com/questions/7018818/iis7-url-redirection-from-root-to-sub-directory)? Can't you rather ask for a new subdomain if all URLs are absolute to the root (`/`)? – CodeCaster Sep 15 '14 at 11:27
  • A site already exists at the domain example www.livesite.com They have then added a folder and placed my site in that folder. www.livesite.com/lsnew I would just like something to defult the lsnew to my path's – Pomster Sep 15 '14 at 11:30

0 Answers0