[SOLVED] ie6 css background images and mod_rewrite

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
robsta
Forum Members
Forum Members
Posts: 131
Joined: Thu Oct 20, 2005 11:39 pm

[SOLVED] ie6 css background images and mod_rewrite

Post by robsta »

Okay

For the record and to help others... I spent hours trying to work out why my png css filter replacements for ie6 weren't working with subpages on my CMSMS site... they worked fine throughout the site until I went to a subpage.

ie:

http://www.examplesitename.co.nz/about/
my png images show up as defined in my css stylesheet

but when I accessed the page underneath:

http://www.examplesitename.co.nz/about/staff
none of my png images appeared

BUT!!! when I used:
http://www.examplesitename.co.nz/index.php?page=staff
the images show...

So mod_rewrite must be affecting the stylesheet's filter paths somehow... but only for ie6 as this didn't occur in any other browser...

My head started hitting my desk as I'd just had 10,000 flyers printed with the mod_rewrite url... I couldn't change it... but I couldn't have the logo not appear on the sites subpages...

I experimented with different tweaks to the mod_rewrite script to no avail... then it struck me all my image paths in the css sheet were relative... what if I changed them so they looked for the root folder by adding a / in front of the image's paths...

What do you know it works... if you're doing the pngfix css replacement make the image paths relative to the root folder..

ie: '/images/logo.gif'    not    'images/logo.gif'

Cheers

R
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: [SOLVED] ie6 css background images and mod_rewrite

Post by Dr.CSS »

Do you have the {metadata} tag in the head, does it give you a base href in the header?...
User avatar
robsta
Forum Members
Forum Members
Posts: 131
Joined: Thu Oct 20, 2005 11:39 pm

Re: [SOLVED] ie6 css background images and mod_rewrite

Post by robsta »

Yes... I think it has to do with the way IE calls the filter property as it's calling it from the stylesheet not the page ... mind you only 30% of the world are still holding onto ie6 so fingers crossed within a year or so this will be a thing of the past
andrewvideo
Forum Members
Forum Members
Posts: 127
Joined: Fri Nov 28, 2008 10:28 pm

Re: [SOLVED] ie6 css background images and mod_rewrite

Post by andrewvideo »

Yes, I tried everything to get a site to work in IE 6. I was thinking to do with .htdocs

Than found this post and tried the '/images/logo.gif' from 'images/logo.gif' and worked great.

Cheers
Post Reply

Return to “CMSMS Core”