I am setting up a local CodeIgniter development environment on my windows machine using xampp. I am having a little bit of trouble with the css files. I am guessing that I need to configure my application's path somewhere.
The development url is this (this is routed to the home page ):
localhost/my_app
I am linking my stylesheet like this
<link rel="stylesheet" href="/css/style.css" type="text/css" />
on a production server this works just fine, but the css will not load locally because it seems to be linking to localhost/css/style.css
instead of localhost/my_app/css/style.css
.
when I change the link to this, it works:
<link rel="stylesheet" href="/my_app/css/style.css" type="text/css" />
this link works, but still will not load the background-image:url('/images/image.png')
I am using.
I don't want to code all of my paths with my_app/directory_i_want_to_access
because then I will have to go back and change them whenever I push to production.