?
Solved

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

Posted on 2007-10-11
10
Medium Priority
?
190 Views
Last Modified: 2013-11-19
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?
0
Comment
Question by:MattKenefick
  • 5
  • 4
10 Comments
 
LVL 16

Accepted Solution

by:
golfDoctor earned 500 total points
ID: 20062082
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.
0
 
LVL 17

Expert Comment

by:nplib
ID: 20065390
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.
0
 
LVL 4

Author Comment

by:MattKenefick
ID: 20065433
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.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 17

Expert Comment

by:nplib
ID: 20065469
IS this site publicly accessible?
0
 
LVL 17

Expert Comment

by:nplib
ID: 20066666
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?
0
 
LVL 4

Author Comment

by:MattKenefick
ID: 20067144
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>
0
 
LVL 4

Author Comment

by:MattKenefick
ID: 20067150
And instead of making it

http://example.com/site/index.php?var=example

They appear as

http:///index.php?var=example


No other sites have had this happen. I've never even seen this before.
0
 
LVL 17

Expert Comment

by:nplib
ID: 20067216
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

http:///index.php?var=example

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.
0
 
LVL 4

Author Comment

by:MattKenefick
ID: 20070075
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.
0
 
LVL 17

Expert Comment

by:nplib
ID: 20078968
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.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses four methods for overlaying images in a container on a web page
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses
Course of the Month13 days, 22 hours left to enroll

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question