Announcement

#46 2022-01-06 21:52:47

erAck
Only trying to help
2015-09-06
2059

Re: Seo clean url with image name

For #1, you can specify permalinks for each album and subalbum, in Admin -> Albums -> Manage, tab Permalinks, and name them almost anything you like.

For #2, I don't think so (unless you find a way using .htaccess Rewrite); an image can be associated with multiple albums. If you change your example to https://piwigo.nyebilder.no/picture/Ble … erveien_17 omitting "category" you'll see that clicking left or right arrow jumps to the previous/next image without album context (and /categories gets appended to the URL indicating no specific category).

I don't know the META plugin nor how it would be related to robots.txt, which is only a recommendation to robots that doesn't need to be obeyed or anything, nor what wordpress does with it or why it would need it.


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

Offline

 

#47 2022-01-07 16:28:19

arashnejad
Member
Norway
2021-12-25
14

Re: Seo clean url with image name

Hi reAck!

For #1, you can specify permalinks for each album and subalbum, in Admin -> Albums -> Manage, tab Permalinks, and name them almost anything you like.

----- This is not practical as they are quite a lage number of albums to be done one by one. They will be deleted from time to time so the action has to be on auto.....

For #2, I don't think so (unless you find a way using .htaccess Rewrite); an image can be associated with multiple albums. If you change your example to https://piwigo.nyebilder.no/picture/Ble … erveien_17 omitting "category" you'll see that clicking left or right arrow jumps to the previous/next image without album context (and /categories gets appended to the URL indicating no specific category).

--------All the images are only connected to one album, so if i understand you right, this is not going to be a problem.  I tired to rewrite the code under for my use, did more damage than good! (i am quite new to this).

Used this example:
https://stackoverflow.com/questions/420 … rl-rewrite


I don't know the META plugin nor how it would be related to robots.txt, which is only a recommendation to robots that doesn't need to be obeyed or anything, nor what wordpress does with it or why it would need it.

----------- So placing a robots.txt in the root and say what is alloed and not will do the trick, like this?

User-agent: googlebot
Disallow: *?*
Disallow: ?mobile
Disallow: ?lang
Disallow: /index/recent_cats
Disallow: *.mp4
Disallow: *.txt
Disallow: category$
Disallow: categories$
Disallow: /index/categories/$
Disallow: /index/categories/flat
Disallow: /picture
Disallow: /.well-known
Disallow: /apple-app
Allow: /index/category/
Allow: /index/page/
Allow: /index/contact/
Allow: */category/
Allow: /picture/*/category/
Disallow: /

User-agent: *
Disallow: /

Again, thanks for your time!

Offline

 

#48 2022-01-07 18:04:08

erAck
Only trying to help
2015-09-06
2059

Re: Seo clean url with image name

arashnejad wrote:

So placing a robots.txt in the root and say what is alloed and not will do the trick, like this?

Do what trick? Not follow specific URLs? As said, content of robots.txt is only a recommendation, bots are not bound to obey it and many don't. The Google one might.

All the images are only connected to one album, so if i understand you right, this is not going to be a problem.

Even if each image is associated only with one album, omitting the category URL part will make traveling previous/next image not travel within the album but on a global level (upload order I think, but I might be wrong on that).


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

Offline

 

#49 2022-01-09 20:13:25

arashnejad
Member
Norway
2021-12-25
14

Re: Seo clean url with image name

Thanks for the answers reAck!

Will post if i find more answers regarding the URLS.

Regards
Arash Nejad

Offline

 

#50 2022-01-16 12:29:09

arashnejad
Member
Norway
2021-12-25
14

Re: Seo clean url with image name

Hello,

Is there anyone that can tell me why the synchronization stops, when uploading files from "galleries" ?

Anyone other metod anyone is using for uploading massiv amount of images in many albums?

Regards,

Arash Nejad

Offline

 

#51 2022-11-26 05:13:07

jarodthornton
Member
2022-11-26
2

Re: Seo clean url with image name

plg wrote:

You can get something like myurl.com/picture/funnypic/category/570-second_weekend with the following configuration:

1) install/activate [extension by Piwigo Team] LocalFiles Editor from screen [Administration > Plugins > Manage]

2) open [Administration > Plugins > LocalFiles Editor > Local config] and paste the following code:

Code:

<?php
$conf['question_mark_in_urls'] = false;
$conf['php_extension_in_urls'] = false;
$conf['category_url_style'] = 'id-name';
$conf['picture_url_style'] = 'file';
?>

Please note that:

1) $conf['question_mark_in_urls'] = false requires that  AcceptPathInfo directive is enabled
2) $conf['php_extension_in_urls'] = false requires Options +MultiViews parameter

Added to my HTACCESS in the parent directory for Piwigo:

Code:

AcceptPathInfo On
Options +MultiViews

Works great! Thank you :)

Offline

 

#52 2023-07-08 12:10:23

Ewgeniy
Member
2023-07-08
19

Re: Seo clean url with image name

Hi. Everything is done as written.

Only the root folder works:
https://lformat.ru/piwigo/
If you go to the album:
https://lformat.ru/piwigo/index/category/moscow
I get:
"Not Found.
The requested URL was not found on this server."

Which is done:

local/config/config.inc.php:

<?php
$conf['question_mark_in_urls'] = false;
$conf['php_extension_in_urls'] = false;
$conf['category_url_style'] = 'id-name';
$conf['picture_url_style'] = 'file';
?>

.htaccess:

AcceptPathInfo On
Options +MultiViews

What did I do wrong?

Offline

 

#53 2023-07-08 15:41:32

Katryne
Member
2016-12-03
377

Re: Seo clean url with image name

Hello,
On my servers, I was never able to have the question-mark thing work. It produced errors. Below is the only url-rewriting I was able to create. Mark that the question mark line is disabled. You may try again without it.

Code:

//$conf['question_mark_in_urls'] = false;
$conf['php_extension_in_urls'] = false;
$conf['category_url_style'] = 'id-name';
$conf['picture_url_style'] = 'file';

http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

#54 2023-07-08 17:49:00

Ewgeniy
Member
2023-07-08
19

Re: Seo clean url with image name

Katryne wrote:

Hello,
On my servers, I was never able to have the question-mark thing work. It produced errors. Below is the only url-rewriting I was able to create. Mark that the question mark line is disabled. You may try again without it.

Code:

//$conf['question_mark_in_urls'] = false;
$conf['php_extension_in_urls'] = false;
$conf['category_url_style'] = 'id-name';
$conf['picture_url_style'] = 'file';

Thank you for your reply. That didn't help, and that's what I want to get rid of the question mark. )

Offline

 

#55 2023-07-08 19:21:44

Katryne
Member
2016-12-03
377

Re: Seo clean url with image name

What I meant is : I was told that it depends on your server. Some do not permit it.


http://photos.katrynou.fr/ v.14.1.0 https://album.chauvigne.info/ v.13.8.0
Système d'exploitation: Linux - Hébergeur 1&1-Ionos PHP: 8.0.28 - MySQL: 5.7.38
Bibliothèque graphique: External ImageMagick 6.9.10-23

Offline

 

Board footer

Powered by FluxBB

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