EnableFriendlyUserUrls

Supporting user-friendly URL's

If you want to share links to photos or tags, you can use more beautiful links instead of "index.php?blabla". All you need is your Apache webserver supporting mod_rewrite. Look around in the web - there a plenty enough howto's around, howto enable it.

1. Add the following to your Apache configuration (mod_rewrite module need to be loaded). Also addept here the path to your phpfspot installation.

RewriteEngine On
RewriteRule ^/photoview/(.*)$ /var/www/phpfspot/index.php/$1
RewriteRule ^/photo/(.*)$ /var/www/phpfspot/index.php/$1
RewriteRule ^/tag/(.*)$ /var/www/phpfspot/index.php/$1

2. in phpfspot_cfg.php, set the parameter $user_friendly_url to "true"
3. now you can address phpfspot like this

  • display single-photo view, latest version
/photoview/{id-of-photo}
  • display photo in original width, latest photo version
/photo/{id-of-photo}
  • display photo in requested width, latest photo version
/photo/{id-of-photo}/{width}
  • display photo in requested width for requested photo version
/photo/{id-of-photo}/{width}/{version-id}
  • photo-index of the specified tag (id) - a specific page can be selected by {page}
/tag/{id}/{page}

Also available in: HTML TXT