Announcement

#1 2015-02-13 00:23:47

sorabji
Member
nyc
2015-02-13
6

Strange issue with Clean URLs

Hello/Hi/Greetings,

Kind of a weird problem... I tried a few searches of the forum and FAQ but can't find anything.

I activated clean URLs by dropping this into the LocalFiles editor:

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

Now I find that some (not all) thumbnails no longer correspond to the images that they link to. Best example is probably this, where I think every single thumbnail links to an image in another gallery:

http://sorabji.com/foundphotos/index/ca … _of_slides

Other albums, like this one, seem to be fine, though I did not click on every image:

http://sorabji.com/foundphotos/index/ca … odachromes

At a glance there seems to be some issue with the fact that many images among the galleries share the same filename, i.e. "image100.jpg" exists in several albums. You'll notice in the first link above that the first image (image202) links to an image202, but in a separate gallery. The URL that the thumbnail points to looks like it should be accurate but it sends you to a URL that eliminates the category name.

p.s., I converted a Menalto Gallery2 install to Piwigo using Daniel Schwen's excellent g2piwigo Perl script. It seemed to have worked perfectly. This problem only occurs after clean URLs are enabled.

Any wisdom is appreciated.

-mt


Piwigo version: 2.7.3
PHP version: 5.2.14
MySQL version: 5.0.67
Piwigo URL: http://sorabji.com/foundphotos/index/ca … _of_slides

Offline

 

#2 2015-02-13 08:02:29

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Strange issue with Clean URLs

Set picture url style to id-file

Offline

 

#3 2015-02-13 20:06:14

sorabji
Member
nyc
2015-02-13
6

Re: Strange issue with Clean URLs

mistic100 wrote:

Set picture url style to id-file

That did it. Genius. Much appreciated.

Offline

 

#4 2015-02-14 02:20:30

travelsignposts
Member
2015-02-02
19

Re: Strange issue with Clean URLs

Interesting. This didn't work for me, unfortunately. I still get a 404 on the "picture" image in the gallery. Could this be something to do with the rewrite rules? Viz. my earlier post with unfortunately no solution:
My VPS runs on a Litespeed server. Multiview is not available on Litespeed, so it is necessary to use rewrite rules to achieve SEO friendly URLs.

My .htaccess file in my Piwigo home directory Is this:
Code:

#htaccess piwigo
AcceptPathInfo On

RewriteEngine On
RewriteCond %{REQUEST_URI} !.+php*
RewriteCond %{DOCUMENT_ROOT}/$1\.php -f
RewriteRule ^([^/]+)/?(.*)$ $1.php/$2 [L]
and I have a local config file as follows:
Code:

<?php
/* The file does not exist until some information is entered
below. Once information is entered and saved, the file will be created. */
$conf['question_mark_in_urls'] = false;
$conf['php_extension_in_urls'] = false;
$conf['category_url_style'] = 'id-name';
$conf['picture_url_style'] = 'file';
?>
This successfully removes the .php from the URLs, and works fine except for where the URL changes to use "picture" instead of "index", when it produces a 404.

As I am new to Piwigo, I'm not quite clear where "picture.php" fits into the scheme of things, so am uncertain as to where I'm going wrong. Can anyone help me?

(It would be nice to remove the "index" and "picture" references completely, but I don't think this is possible in Piwigo)

Piwigo version: 2.7.3
Operating system: Linux
PHP: 5.4.27
MySQL: 5.5.33a-MariaDB
Graphics Library: External ImageMagick 6.2.8
Piwigo URL (currently behind maintenance wall): http://www.travelsignpostschina/destination/

Cheers,

Tony Page

Offline

 

#5 2015-02-14 02:28:43

sorabji
Member
nyc
2015-02-13
6

Re: Strange issue with Clean URLs

travelsignposts wrote:

(It would be nice to remove the "index" and "picture" references completely,

I concur, stripping "index", "category", and "picture" from the URLs would be boss. I tried to find a way to do that but mod_rewrite rules don't seem to have any effect.

-mt

Offline

 

Board footer

Powered by FluxBB

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