Forum Moderators: phranque

Message Too Old, No Replies

Trailing slash problem (not to do with .htaccess)

When typing www.mysite.co.uk

         

ms348

2:05 pm on Apr 23, 2004 (gmt 0)



Hi Everyone
I have a problem with a website I maintain. Basically if you type in www.mysite.co.uk without a slash (/) it will not load up the imported css stylesheet for it. Any other way and it will load up fine. I can't figure out where the problem is. This is in the HTML code that links to the CSS file:

<link href="ms4_styles/text.css" rel="stylesheet" type="text/css">

I have this in another site which doesn't have this problem so I don't think this is it. Anybody have any ideas? This problem only occurs on my work pc and works fine otherwise!

Thanks

tombola

4:04 pm on Apr 23, 2004 (gmt 0)

10+ Year Member



What happens when you define the URL of your ms4_styles directory?

<base href="http://www.example.com/ms4_styles/">
<link href="text.css" rel="stylesheet" type="text/css">

ms348

8:29 am on Apr 29, 2004 (gmt 0)



I tried and I can't load the images etc from its directory with it!

M

encyclo

11:45 am on Apr 29, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just add the trailing slash to the link statement:

<link href="/ms4_styles/text.css" rel="stylesheet" type="text/css">

That should fix it.