plegall / Piwigo-community

11 stars 23 forks source link

Use absolute root URL for webservice call. Fixes SEO urls. #28

Closed tkuther closed 4 years ago

tkuther commented 7 years ago

When using SEO Urls with

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

the URL of the upload form is /index/add_photos here with those settings.

In add_photos.tpl, the webservice is called with a relative ws.php url, resulting in /index/add_photosws.php -> 404.

This patch fixes this by prepending the absolute root url.

tkuther commented 7 years ago

There was a syntax error, sorry. Corrected and git push -f'ed.