• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 193
  • Last Modified:

IE is demanding full direct links.. Turns others into http:///?var=example. FF/S/O are fine. Why?

In Firefox / Opera / Safari it all works fine. In IE it goes haywire.

I'm making a site with PHP 5, Smarty, Javascript, HTML.

I'm running it on MAMP right now for testing. When I connect to it from my PC and use PC Firefox or Safari, I see it fine. When I look at it through IE, all the links are errors.. none of the CSS links up..

A link would be... a href="index.php?var=example"

In FF/S/O , it pulls the whole thing: http://localhost/site/index.php?var=example
In IE: It just pulls http:///index.php?var=example.

Notice in IE it has 3 slashes for some reason.

This is clearly why none of the javascript or CSS is linking up, but why is the IE demanding full links??

I removed the Doctype and everything to test that, but that wasn't the issue.

Other sites on this MAMP server I look at with IE are fine. It just seems to be this one in particular for some reason.

Any Ideas?
  • 5
  • 4
1 Solution
It would work fine on server.  Just not on localhost.

You should use full path anyway for links, especially if this is on the internet.  SEO dude.
Can you post your code?
At least the part that is giving trouble.

IE, FIREFOX and OPERA all do stuff differently and read HTML differently.

And using full path is not a good idea when making a site, cause if anything changes, then you have to go through your whole site and fix every link.

If you look at the source of the big boys, Microsoft, HP, Google, EE, they use relative path. You only use full path when leaving the domain.
MattKenefickAuthor Commented:
I would only use a full path if I were forcing a HTTPS or something similar obviously.

I can't really post the code. It's a very extensive site and I can't just nail the problem to a certain location or I would have solved it ;)

It's strange. Here's something else:

When I just let Smarty display the website, on PC IE7.0 & IE6.0 it failed.
When I echoed like.. "<div>&nbsp;</div>" THEN displayed Smarty, PC IE7.0 showed it fine. IE6.0 still failed though.

Its very strange.

I tried multiple doctypes in case that was the issue and it seems to be fine. All the head, body, etc tags are in there fine.
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

IS this site publicly accessible?
Can you post say the portion that generates the links, or at least the result of the generated link,
Ex. go to the page, go view source then paste the result here?
MattKenefickAuthor Commented:
It's not accessible. It's on my local test server where every other site works fine.

The generated links are like this

<a href="index.php?var=example">Content</a>
MattKenefickAuthor Commented:
And instead of making it


They appear as


No other sites have had this happen. I've never even seen this before.
We can't help unless we see the code that is generating these links.

This <a href="index.php?var=example">Content</a>

Cannot produce


there are 3 /// in the above, browsers only attrib http:// to the front of a link that doesn't have it. so something is placing that extra / in the code. That tells the browser that it's not a relative path but a full path.
MattKenefickAuthor Commented:
I know. I'm not trying to sound rude but I've been doing this for 15 years. I've gone over the basics.

The reason I'm asking on this forum is because there is nothing generating the links other than Smarty. The template files have just the simple link above, Smarty just displays it. Shouldn't be causing an error.

Nothing generates the link which is why it's so confusing why I get http:///

Its like it's trying to do file:/// but using http instead. I'm pretty lost on this one.
So can I see the smarty code that makes that link?

I don't want to be rude either, but as I have said to others in the past, posting code is better then speculation.

If you don't post some code that I can analyze, I can't help. Unless it's a black and white answer.
In this case either there's a typo somewhere, and having a second pair of eye's read your work is always better then you rereading it over and over, or there is a mistake, but I can't help unless you help me.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now