Announcement

#1 2023-04-11 08:40:18

myVortexServers
Member
2021-08-04
20

URL Changes?

Hello/Hi/Greetings,

Since Piwigo design the way URL is setup:

photos.transitriderproductions.com/index.php?/category/niagara-falls-transit-shuttle

but when you click a image, it takes to:

photos.transitriderproductions.com/picture.php?/3611/category/niagara-falls-transit-shuttle

Now the index.php has the top bar with website name and dark background but the picture.php doesn't. How I can make sure all layout are on the same page?

Also, can I force Piwigo to have a better page link for SEO like this:

photos.transitriderproductions.com/niagara-falls-transit-shuttle/3611/

Is there a way?

I have tried everything, no luck.

Let me know

Thanks

Last edited by myVortexServers (2023-04-11 08:48:24)

Offline

 

#2 2023-04-13 18:50:11

Ralf
Member
Dorsten-Lembeck
2012-05-08
230

Re: URL Changes?

Hi,

you can try the following.

Local files editor plugin, add the following under 'local configuration' tab below <?php
$conf['question_mark_in_urls'] = false;
$conf['category_url_style'] = 'id-name';
$conf['picture_url_style'] = 'id-file';
$conf['original_url_protection'] = 'images';
$conf['derivative_url_style'] = 2;
$conf['php_extension_in_urls'] = false;
$conf['tag_url_style'] = 'tag';

If you will get an error viewing your gallery after doing the changes above:
Add the following lines to the .htaccess file:
AcceptPathInfo On
Options -Indexes +MultiViews

<Files "*.php">
MultiviewsMatch Any
</Files>

This will give you picture urls like this:
https://www.yourdomain/picture/pictureI … tegoryName

Cheers
Ralf


There are only two kinds of music:
Rock and Roll

https://www.ralf-kerkhoff.de

Offline

 

#3 2023-04-26 18:20:18

Ralf
Member
Dorsten-Lembeck
2012-05-08
230

Re: URL Changes?

Are you sure this happens only after making the changes in local files editor?
Or are there any changes made in the css ?

Never had a layout problem after applying the settings for clean url's.


There are only two kinds of music:
Rock and Roll

https://www.ralf-kerkhoff.de

Offline

 

#4 2023-04-26 19:14:26

OHappyDay
Member
2023-02-08
64

Re: URL Changes?

I tried your changes and found out that the line

   $conf['php_extension_in_urls'] = false;

causes layout problems:

On the top level page of each album the pictures are not displayed at all and nothing can be clicked to enter the album.

Removing the line above fixes this and the URLs for pictures have changed.

My system:

Piwigo 13.6.0 Prüfen, ob eine neue Version verfügbar ist.
Installiert auf 2 Januar 2023, vor 3 Monate 3 Wochen 3 Tage
Betriebssystem: FreeBSD
PHP: 8.1.14 (Info anzeigen) [2023-04-26 19:11:58]
MySQL: 8.0.31 [2023-04-26 19:11:58]
Grafikbibliothek: ImageMagick 6.9.12-72

Theme: Bootstrap Darkroom

Plugins:
gdThumb

Offline

 

#5 2023-04-27 00:02:02

erAck
Only trying to help
2015-09-06
2029

Re: URL Changes?

Note that the description in include/config_default.inc.php reads

Code:

// php_extension_in_urls : if true, the urls generated for picture and
// category will not contain the .php extension. This will work only if
// .htaccess defines Options +MultiViews parameter or url rewriting rules
// are active.
$conf['php_extension_in_urls'] = true;

So apart from that the "if true, ..." is a typo and should read "if false, ..." (submitted PR https://github.com/Piwigo/Piwigo/pull/1906 fwiw..) you'll need
Options +MultiViews
in your Piwigo .htaccess file, otherwise the web server does not find a picture.php or category.php file when only picture or category is given. Caveat, do not have other files with the same basename in the directory, e.g. if there exist picture.old along with picture.php it may serve picture.old instead..


Running Piwigo at https://erack.net/gallery/

Offline

 

#6 2023-05-22 18:45:31

Nigel-Aves
Member
2015-09-22
63

Re: URL Changes?

@Ralf

Just a quick "THANK YOU" for posting this. After months of frustration I know no longer see .php or ?

Many Thanks

Nigel.

Offline

 

#7 2024-04-22 22:24:17

lolewif
Member
2024-03-30
2

Re: URL Changes?

Remember, these changes can be complex and may require a good understanding of web development concepts. If you’re not comfortable making these changes yourself, you might want to consider seeking help from a web developer familiar with Piwigo.

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact