How to bypass / omit the collections view in Plogger 
Plogger is a nifty little photo gallery script for those who want to host their own photos. I used to be a fan of Gallery but the simplicity and essential features of Plogger are far more attractive.
Anyway, Plogger structures a gallery as follows:
Collections > Albums > Photos
However, what if you only have a few albums and don’t necessarily wish to group them in collections? In other words, skip the collections view.
Suppose your gallery address is “funkypics.com/pictures”.The way it is currently set up, when you view the root of your photo gallery (“/pictures”), you view a list of collections, then you click on a collection to view a list of albums (“/pictures/?level=collection&id=1″), then you click on an album to view its photos (“/pictures/?level=album&id=2″). It would be more user-friendly to just bypass the collections step. In other words, when you access “/pictures”, you would automatically view “/pictures/?level=collection&id=1″.
Instead of hacking the core code (which complicates things when you upgrade software), you can bypass the collections level by using a rewrite rule. Rewrite rules basically change the URL that is processed by the server, given a particular circumstance. This is a bit different than simply redirecting a page and is often transparent to the user.
Here’s the code I use, which should be placed in a file called “.htaccess” in the root of your Plogger installation:
RewriteEngine On
# Only URLs without a query string (an example of a query string is "?album=1") will be rewritten
RewriteCond %{QUERY_STRING} ^$
# Rewrite all root directory requests to the album view
RewriteRule !(.+)$ http://pathto/plogger/?level=collection&id=1 [L]
(This assumes that the ID of the only collection in your gallery is 1.)

keung.biz. Hire my web consulting services at 




February 26th, 2008 at 3:48 pm

j.haglund says:
awesome, just what i was looking for! thanks!
April 12th, 2009 at 7:04 am

Kratos says:
Thanks mate, works perfectly.