[pmwiki-users] Improve export-to-html recipe
Petko Yotov
5ko at 5ko.fr
Thu Nov 13 06:18:30 PST 2025
For known bot user agents, $EnableRobotCloakActions and $RobotActions
would cause links to be rewritten to not show ?action URLs in the HTML
source, and to return an error 403 Forbidden, not 500, if the agent
tries to access a forbidden action.
Moreover, wget is not among the default known bot user agents, so it
wouldn't activate the rewriting or blocking.
An internal server error 500 often appears when there is a problem with
one of the scripts, either an error or a PHP incompatibility in local
configuration, in a recipe, or in the core.
It may also be unrelated to PmWiki, say a web application firewall
configuration.
Are there any fatal error details in the PHP error log?
Petko
On 13/11/2025 14:38, Johan Bengtsson wrote:
> Hi,
>
> I tried https://www.pmwiki.org/wiki/Cookbook/ExportHTML but found that
> it didn't work so well.
>
> "EnableRobotCloakActions = 1; " caused our wiki to just show an HTTP
> error 500.
>
> This worked:
>
> wget --recursive --level 5 --no-clobber
> --page-requisites -e robots=off --adjust-extension \
> --span-hosts --convert-links
> --restrict-file-names=ascii --remote-encoding=ISO-8859 \
> --domains ourwiki.portal.se --no-parent \
> --no-host-directories --reject-regex '(.*)\?(.*)'
> ourwiki.portal.se/FooWiki/SomeGroup
>
> The important bit is --reject-regex '(.*)\?(.*)' which stops
> downloading of action= links.
More information about the pmwiki-users
mailing list