Pages: 1
Hi, first off I have to say I'm surprised this isn't already baked into Pwigo. In 2021 it's a really odd thing to overlook.
But anyway... Tidy URL's.
I've read piles of post on this forum but nothing much worked for me without breaking other things, so I dived in and had a play.
I've used the permalink plugin to add permalinks for albums.
I used Localfile plugin to add $conf['picture_url_style'] = 'id-file'; to the core code.
And I've added the following to the htaccess file...
RewriteEngine On
RewriteBase /
# Removes index.php
RewriteCond %{THE_REQUEST} ^.*/index.php
RewriteRule ^(.*)index.php$ http://www.baskerville.me/$1 [R=301,L]
RewriteRule ^(.*)index$ http://www.baskerville.me/$1 [R=301,L]
# Removes picture.php
RewriteCond %{THE_REQUEST} ^.*/picture.php
RewriteRule ^(.*)picture.php$ http://www.baskerville.me/$1 [R=301,L]
RewriteRule ^(.*)picture$ http://www.baskerville.me/$1 [R=301,L]
It's almost there, but I can't get rid of the question marks in the URL...
https://www.baskerville.me/
Anyone any idea?
To the Piwigo guys: C'mon, this is basic stuff nowadays. Can you bake Tidy URL's right into Piwigo in a future update?
Offline
Edit: Scrap that, it's not working. It's killing the final link to the actual photo in a gallery.
I give up. I'll just hope version 12 has tidy URL's baked in.
Offline
You may try what I did :
1 - In root htaccess (create it if it does not exist) I can't remember today why this, but I note it down with Nr 2.
AcceptPathInfo On Options +MultiViews
2 - With the plugin Local Files Editor, tab Local Config :
<?php $conf['question_mark_in_urls'] = false; $conf['php_extension_in_urls'] = false; $conf['category_url_style'] = 'id-name'; $conf['picture_url_style'] = 'file'; ?>
Offline
Oh that works, very nice. Thanks so much.
Offline
You might also want to add
$conf['tag_url_style'] = 'tag';
Read in include/config_default.inc.php about the implications it has.
Offline
Pages: 1