Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Browser problems - relative links


peterr

Recommended Posts

Hi,

 

I've installed osC to a website, for demonstration purposes, to a possible client. Because I didn't want to "clobber" any patrs of the actual website (used for other purposes), I have installed osC in a sub directory/path.

 

I needed to change a few things, but after that, everything is looking good, products being added, links working fine, etc,etc. Then today, I asked a friend to have a look , and he said any of the links show http:///index.php or similar.

 

I have been using Mozilla/Netscape and he uses IE. I have IE 5.50 installed on another computer, and I can see what he means, the 'demo' looks a real mess. In fact all the links to the images are wrong also, so none are showing.

 

I'm sure glad he told me before I showed the client. I know what I've done is a "non-std" method, but sometimes we don't have the luxury of overwriting everything on a website, just to demonstrate osC. In some respects, I'd like to keep the 'demo' there, to show other people what it can do.

 

I can only assume Mozilla is 'smart' enough to work out the realtive paths. Is there any method to fix this other than modifying the file

 

/catalog/includes/configure.php ??

 

The reason I ask is, _that_ file needs a 444, and I don't want to have to ask the host tech support guys to do the CMOD (I do have shell access, but only the tech guys can do a 444) everytime there is "any" changes to configure.php

 

Thanks,

 

Peter

Link to comment
Share on other sites

its the issue with base ref

 

if <base href=""> is blank, then IE gets retarted and does it via / root leve, Moz does it relative, as per normal

 

NOW, what OSC should do is if HTTP_SERVER is blank, or '' , it should NOT write the base href line to the html. Simple, that would fix it.

 

Note: we all can't just put in http://blah.com/ because the address might not work internally on our network , or our paths could be diff between the local server or the 'hosted' server. ie begind NAT, redirected websites.

 

even a ./ wont fix it...

 

so what to do? OSC should adjust to it, theres no other hope, unless theres some magic way to tell IE to NEVER do root level base href via a "-" or "." or "DO RELATIVE U IDIOT" :) or "(IGNORE)"

 

Now there is about 20 reference to code writing base href , this should have been in a function to reduce the repetition perhaps....

 

The only other fix is to add that virtual host to the localhost .... and use that host in the HTTP_SERVER var.

 

grrr, again MS makes our lives that much more 'grrrrr'.

Link to comment
Share on other sites

Hi Raul,

 

its the issue with base ref

 

if <base href="">  is blank, then IE gets retarted and does it via / root leve, Moz does it relative, as per normal

 

In general, I've found IE a real pain when it comes to 'compatibility'. If the whole world did it one way, M$ would do it another. I'm sure glad my friend checked out the site with IE (hmm, well, I should have tested that anyway), because my face would be red, and I would have definitely NOT impressed the client with osC. osC is a great product, but, wow, it looked terrible with IE. I even have JS menus looking great in Netscape/Moz, but in IE, they overlay each other. :(

 

NOW, what OSC should do is if HTTP_SERVER is blank, or '' , it should NOT write the base href line to the html. Simple, that would fix it.

 

Yes, I think there should be a little bit more thought go into browser issues, and have the code handle 99% of it. That way, when there is a new release of osC, then we don't have to go and redo all those mods again. :)

 

even a ./ wont fix it...

 

Yes, I'd believe it.

 

so what to do? OSC should adjust to it, theres no other hope, unless theres some magic way to tell IE to NEVER do root level base href via a "-" or "." or "DO RELATIVE U IDIOT" :)  or "(IGNORE)"

 

Now there is about 20 reference to code writing base href , this should have been in a function to reduce the repetition perhaps....

 

The only other fix is to add that virtual host to the localhost .... and use that host in the HTTP_SERVER var.

 

Yikes, when you said about 20 references, I freaked out, I'm alreday running about 4 days behind and don't need to mod _that_ many. Fortunately, after a bit of playing around and changing things, it now looks juts the same in IE, only a one line change

 

/catalog/includes/configure.php - line 23

 

define('DIR_WS_HTTP_CATALOG', 'http://mydomain/ec/osCommerce/catalog/');

 

That did it, it looks exactly the same, and the links work in both. I have osC installed in a sub path, because I don't want to clobber my website, just for a demo. Later on, I might shift it to a 'demos' path, so that anyone else who wants to see how osC works can just run the demo.

 

grrr, again MS makes our lives that much more 'grrrrr'.

 

Yes, M$ products sure make it hard sometimes. :D

 

Peter

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...