Is there an easy way to disable the RSS feed? I've got those menu items hidden but just now realized that you can still browse directly to notification.php and feed.php and get the feeds. How can I turn those off (other than just renaming or protecting those two PHP files)?
Operating system: Linux
PHP: 5.6.11-1ubuntu3.1 (Show info) [2016-03-10 22:32:17]
MySQL: 5.6.28-0ubuntu0.15.10.1 [2016-03-10 22:32:17]
Graphics Library: External ImageMagick 6.8.9-9
Offline
Edit
/include/menubar.inc.php
editing in this file, the line 287 and the following
Or seeking: // notification
// notification
//$block->data['rss'] =
//array(
//'TITLE'=>l10n('RSS feed'),
//'NAME'=>l10n('Notification'),
//'URL'=> get_root_url().'notification.php',
//'REL'=> 'rel="nofollow"'
//);
Do before a backup of the file , which is required before changes
Greeting, Ingo.
That doesn't disable the feeds. All that would do is remove the menu item, which I've already done via Advanced Menu Manager. I'm trying to prevent people from navigating directly to notification.php or feed.php, not just hide the option.
Offline
.htaccess or apache configuration file:
SetEnvIfNoCase Request_Uri "/feed.php" feed
Deny from env=feed
Last edited by Zentalquabula (2016-03-15 00:23:07)
Offline
Ah, good idea Zentalquabula ... thanks for the idea.
I ended up putting this in my piwigo.conf file for Apache:
SetEnvIf Request_Uri "/photos/feed.php" feed SetEnvIf Request_Uri "/photos/notification.php" notification Deny from env=feed Deny from env=notification
And now you can't access those two pages directly:
[Mon Mar 14 19:12:42.779846 2016] [access_compat:error] [pid 18100] [client xxx] AH01797: client denied by server configuration: /usr/local/piwigo/feed.php [Mon Mar 14 19:12:43.021914 2016] [access_compat:error] [pid 18100] [client xxx] AH01797: client denied by server configuration: /usr/local/piwigo/notification.php
Offline