Link to home
Start Free TrialLog in
Avatar of luefher
luefherFlag for United States of America

asked on

Visual Studio built-in server adds directory (locally)

Hello,

This has been an annoyance for a while now. When running a website project locally, the built-in server makes the root "localhost:port/directory/", where directory is the name of the directory in which the project resides. This creates a problem once you start adding css files with background images that use absolute path. Is there a way to have it run locally without it appending the directory name or some other way that will allow to use absolute paths locally?

Thanks!
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Why do you need to use absolute paths with CSS styles?

Bob
Avatar of luefher

ASKER

no particuluar reason, i am used to using absolute paths...
Things work best with relative paths, since you can rehome a web site without having to change anything.  A lot of ASP.NET examples will show relative pathing.  I think that your problem will evaporate with relative pathing.

Bob
ASKER CERTIFIED SOLUTION
Avatar of luefher
luefher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial