![]() |
|
How I bypass the index page and go to the album page - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: How I bypass the index page and go to the album page (/thread-1541.html) |
How I bypass the index page and go to the album page - mww - 2007-07-12 I need to bypass the index page because only one album will be used - no need to list the one album on the index page. So, what I did was remove everything inside the index.php file except, `` Then, under that very first line, add the following lines: ob_start(); // Redirect index.php to the album page b/c we don't need a list of // available galleries since we are dealing with only one gallery if (getNumAlbums() == 1){ header("HTTP/1.1 301 Moved Permanently"); header("Location: http://www.your-website.com/zenphoto/your-gallery/"); } ` Brief explanation:
It will look like this: |