Skip to content

Pretty URLs in Gallery 3

I (finally) just upgraded my picture gallery to Gallery 3.0.4 (on a side note, in the process I enabled anonymous comments, we’ll see how it goes…). In the process, I lost the pretty URLs for a while. Turns out they are disabled by default, but enabling them is trivial: just uncomment the last part of the provided .htaccess file, ie:

<IfModule mod_rewrite.c>
	Options +FollowSymLinks
	RewriteEngine On
	RewriteBase /
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^(.*)$ index.php?kohana_uri=$1 [QSA,PT,L]
	RewriteRule ^$ index.php?kohana_uri=$1 [QSA,PT,L]
	RewriteRule ^index.php/(.*) $1 [QSA,R,L]

Note that obviously (and as usual), you need mod_rewrite to use this.

Posted in web development.

0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

Some HTML is OK

or, reply to this post via trackback.

Sorry about the CAPTCHA that requires JS. If you really don't want to enable JS and still want to comment, you can send me your comment via e-mail and I'll post it for you.

Please solve the CAPTCHA below in order to fight spamWordPress CAPTCHA