Skip

HTML issues
October 27, 2004 1:28 PM   Subscribe

HTML crisis: I use relative URLS on my blog because pages archive in different files- for example, a tag for a JPEG would be /images/image.jpg inside image tags. Because I use that first slash to make the relative URL work, all image tags are broken when you type or link to my site without a "www" in the url. In other words, "www.mysite.com" shows all the images fine, but "mysite.com" loads the site with little red x's everywhere. Solution?

What's weird is that I load all my HTML and Flash (swf) files through relative URLs as well, and they load fine with or without a www in the URL. COuld it be a browser issue instead of a code issue? Using Windows XP with IE, currently SP2 but this problem occured in SP1 as well.
posted by XQUZYPHYR to Computers & Internet (6 answers total)
 
It could be a server config issue, I've never ever heard of this.

A possible solution could be to implement a BASE tag, but that would throw off links in deeper pages.
posted by o2b at 1:41 PM on October 27, 2004


Safari is showing that without the www, a number of the files are showing up as forbidden.

Might want to check your permissions and server config.
posted by Remy at 1:51 PM on October 27, 2004


Remy- exactly what does that mean? What permissions are off and how do I set them? What would it say about the image files that it doesn't for, say, swf files?
posted by XQUZYPHYR at 1:58 PM on October 27, 2004


ARRGH. I AM DUMB.

Okay, I figured it out. On Remy's advice, I went to my CPanel to see what server settings I could look at. It turns out my my host apparently reset my hotlink protect file when they upgraded my account to a new server to handle more bandwidth a few weeks ago.

Cpanel automatically puts http://www.xoverboard.com on the allow list, but not http://xoverboard.com. And in the reset it removed .swfs from file extensions to protect and reverted to the defaults of gifs, jpegs, and pngs.

Thanks for the advice, Remy, because without the magic word "server settings" I never would have poked around my Cpanel page. I was five minutes away from filling the website with butane.
posted by XQUZYPHYR at 2:14 PM on October 27, 2004


Yeah. 'Cause relative URLs should always link to the hostname of their source, no matter what that hostname is.
posted by DrJohnEvans at 6:15 PM on October 27, 2004


Similarly, a lot of websites in Japan can't be accessed without adding "www."

For example, Yomiuri Shimbun is the largest newspaper in the country, but when I try yomiuri.co.jp/ I get a "no server" error until I add the "www".
posted by planetkyoto at 6:18 PM on October 27, 2004


« Older My mother will celebrate her 6...   |  [VegetableFilter] What should ... Newer »
This thread is closed to new comments.


Post