Piwigo is a nice photo galerie webservice. To get nice URLs without ".php" and "?", you'll need some settings in the php config file of piwigo and some mod_rewrite.
Example apache root directory: /var/www/piwigo
locale Piwigo config:
/var/www/piwigo/local/config/config.inc.php
<?php // local/config/config.inc.php $conf['question_mark_in_urls'] = false; $conf['php_extension_in_urls'] = false; ?>
TIP: check the default config file for further ideas: include/config_default.inc.php
in the vhost config:
DocumentRoot /var/www/piwigo/ <Directory /var/www/piwigo/> Options -Multiviews +Indexes +FollowSymLinks ## rewrite with mod_rewrite: ## index -> index.php ## picture -> picture.php ## i -> i.php RewriteEngine on RewriteRule ^index/(.*) index.php/$1 [QSA,L] RewriteRule ^picture/(.*) picture.php/$1 [QSA,L] RewriteRule ^i/(.*) i.php/$1 [QSA,L] # for debugging of the rewrite-rules: #LogLevel alert rewrite:trace6 </Directory>
Valid for all tips, tricks and cheat sheets:
these are simple notes for my personal use,
here readable for all in the hope it
might help someone else, too.
Use at your own risk
Hints, error reports, thanks , etc. send please to: web.21@unixwitch.de
more at: System Administration