« Previous Next »

Answered Thread: Images not showing

Last post 07-10-2009 12:03 PM by ruslany. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 07-10-2009, 7:27 AM

    Images not showing

    Hello All, I am trying to user URLRewriter in our site. http://birkatelyon.com/test/items.asp?category=RINGS&subcat=DESINSP. But when I go here http://birkatelyon.com/test/RINGS/DESINSP it doesnt show the images. Can you tell me what I am doing wrong? Thanks in advance. Regards, Suvi Joseph
  • 07-10-2009, 9:29 AM In reply to

    Re: Images not showing

    First guess is your images are using relative links.  Since you changed the URL, the links no longer point to the correct location.

    Jeff

    Look for Wrox's new book Professional IIS 7 in your local bookstore, or order now at Amazon.com
  • 07-10-2009, 9:38 AM In reply to

    Re: Images not showing

    Hello Jeff, Thanks for the reply. I give the images link something like "images/abcde.jpg" in the pages. Is there any common place where I can provide the path of the images? Regards, Suvi Joseph
  • 07-10-2009, 12:03 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 664

    Answered Re: Images not showing

    Make sure that you rewrite rule does not rewrite requests to image files. The rule should have two conditions that check if the requested url is not a file or a directory:

    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />

    As was pointed out earlier in the thread you have relative paths to the images, which is what most probably causes them not to load. You have two options:

    1. Change all the image links to absolute paths, e.g.: "/images/abcde.jpg", or
    2. Add the <base> tag to all the pages.

     

    http://ruslany.net
Page 1 of 1 (4 items)
Microsoft Communities