Maya fixed it in two steps. First, she added simple index.html files into each gallery directory that displayed thumbnails and linked to individual images. That allowed plain directory requests to return useful pages even if the wrapper was present. Second, she adjusted the JavaScript so links requested specific pages rather than bare directories:
A few days later the artist replied with a thank‑you and a link to a revived portfolio. Visitors could browse the images again, and Maya felt the quiet satisfaction of turning confusing legacy behavior into a simple, durable fix.
load('gallery/index.html')
Maya opened the site in her browser and saw exactly what the artist described: a frameset-like layout served by indexframe.shtml, with each gallery link pointing to a relative path like "gallery/". The server used Apache with SSI enabled. Maya suspected two things: either the server was serving the same navigation wrapper for every request, or the links relied on a missing index file inside each folder.
She inspected the site files over SFTP. In each gallery folder there were JPEGs and an images.html template, but no index.html. Meanwhile indexframe.shtml included a server-side include that pulled in a header and then used a little JavaScript to load content into a center frame: The links called load('gallery/'), which worked only if gallery/ returned an HTML page. Apache, however, was configured to treat .shtml files specially and to map directory requests through indexframe.shtml via a rewrite rule—so every request got the same wrapper. That explained the reload loop.
She also cleaned up the server rules: a rewrite that forced directories to indexframe.shtml was changed to only apply to the site root, not to subdirectories. Finally, she tested on different browsers and confirmed the images loaded correctly in the content frame and direct visits to gallery URLs worked too.
She wrote a short, friendly reply to the artist: a summary of what caused the problem, what she changed, and instructions for maintaining new galleries—each new folder needs an index.html or explicit link to a file. She attached a quick template for a gallery index so the artist could copy‑paste it and upload thumbnails easily.