Does your code work locally? And when you upload it it does not work?
Are you testing/developing on a windows machine and are you upload to a linux server. Windows server is more forgiving than linux, linux is case sensitive and only accepts '/' in the directory structure.
Does your code work locally? And when you upload it it does not work?
Are you testing/developing on a windows machine and are you upload to a linux server. Windows server is more forgiving than linux, linux is case sensitive and only accepts '/' in the directory structure.
What is the link to your website?
Yeah, I'm testing in windows and uploading to linux. The url is lutherultimate.com. One thing is that when I access the admin area through admin.lutherultimate.com/schedule.php, it doesn't work, but if I do lutherultimate.com/admin/schedule.php it does.
Ofcourse, admin.lutherultimate.com/schedule.php is a subdomain so it wont have the same path to the css file on the main domain as the admin directory under the main domain.
jaoudestudios wrote:Ofcourse, admin.lutherultimate.com/schedule.php is a subdomain so it wont have the same path to the css file on the main domain as the admin directory under the main domain.
Do you know what I would need to do to make it work?
Remember that relative URL's are interpreted by the BROWSER, not the server. If you want to check if the file exists, try typing the path in the browsers address bar as you are telling it to use.
I solved this problem in my CMS by adding a setting for "BaseURL" which is prepended to links like that. That way, I just reference everything absolute when I need it to be.
omniuni wrote:Remember that relative URL's are interpreted by the BROWSER, not the server. If you want to check if the file exists, try typing the path in the browsers address bar as you are telling it to use.
I solved this problem in my CMS by adding a setting for "BaseURL" which is prepended to links like that. That way, I just reference everything absolute when I need it to be.
So I would have to go back and change all of them when I post it online?
omniuni wrote:Well, the idea is that once you set the base url, it automatically is applied to all of your pages, so you don't need to re-write anything.
But I'm on a testing server that doesn't have that url. I think I might have a fix by creating a styles.php page and requiring it through php.
Well, you'd set the url to http://localhost/ or whatever for you testing machine, and then http://mysite.com/ or whatever. I would definitely advise to NOT try adding style info with a require() in PHP... it's just kind of bad form!