Hi,
Whenever I go to
http://localhost/zenphoto/index.php and navigate into my album and pictures, there is a breadcrumb links that are created at the top of the page.
Gallery-Album Name-Picture Name
When I click on Gallery, it displays the structure/director showing the folders and files.
What file and what do I need to modify to prevent the viewer clicking on Gallery and seeing my directory structure? Zp-config.php or .htaccess file? Thanks in advance.
Comments
If this does not work, post the real link to your album so we can investigate.
They see:
Index of /zenphoto
Parent Directory
License.txt
README.html
albums/
cache/
example_robots.txt
index.php
lighttpd-rewrite.txt
rss-comments.php
rss.php
themes/
zp-core/
How do I prevent the user from seeing this?
Try this, go to this link from the ZenPhoto Demo.
http://www.zenphoto.org/zenphoto/impressionists/Monet+-+sunrise.jpg.php
This is what I am trying to have happen
Click on the top left on Demo Gallery (Look on the status bar below and see that it is going to http://www.zenphoto.org/zenphoto/)
This should take you back to the Albums Index
What happens for me is it shows the directory structure instead of displaying the Albums Index.
Can you provide the URL to your gallery? That way we can take a look.
Loading index.php is a function of your server. Maybe you do not have the right options set.
Create a file called index.html (This is the file that Apache looks for (This is set up in http.conf))
Wrote a javascript redirect code to point to the index.php file
Works like a charm. Thanks again guys.
Clearly the problem is that index.php isn't set as a default file for directories under Apache (or whichever server you're using).
If it's Apache, you need to edit your apache.conf or httpd.conf (main Apache config file) and find the DirectoryIndex line. It should read:
`DirectoryIndex index.html index.htm default.html` or something similar.
Change it to:
`DirectoryIndex index.html index.htm default.html index.php` and whichever other directory default files you want, but definitely add the index.php to that line
Read more here...
http://httpd.apache.org/docs/2.0/mod/mod_dir.html