Re: Improve export-to-html recipe
Johan Bengtsson <[email protected]> Thu, 13 Nov 2025 15:42:57 +0000
| Newsgroups | gmane.comp.web.wiki.pmwiki.user |
|---|---|
| Message-ID | <GVYP280MB0366FFCA534190DA9A2E65D5CECDA@GVYP280MB0366.SWEP280.PROD.OUTLOOK.COM> |
Ok, I see now that $EnableRobotCloakActions was missing the dollar sign in = our config.php resulting in a php parse error! But still --reject-regex '(.*)\?(.*)' is useful with wget. -Johan = Med v=E4nlig h=E4lsning / Kind Regards CHALMERS Johan Bengtsson Supporttekniker IT | Support Technician IT Chalmers verksamhetsst=F6d | Chalmers Operations Support IT-avdelningen | IT Office | IT-support | IT Support +46(0)31 772 6734 Chalmers tekniska h=F6gskola | Chalmers University of Technology Chalmers teknikpark / Sven Hultins Gata 9B SE-412 96 G=F6teborg | Gothenburg Sverige | Sweden www.chalmers.se ________________________________________ Fr=E5n: Petko Yotov <[email protected]> Skickat: den 13 november 2025 15:18 Till: Johan Bengtsson Kopia: pmwiki-users =C4mne: Re: [pmwiki-users] Improve export-to-html recipe 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 =3D 1; " caused our wiki to just show an HTTP > error 500. > > This worked: > > wget --recursive --level 5 --no-clobber > --page-requisites -e robots=3Doff --adjust-extension \ > --span-hosts --convert-links > --restrict-file-names=3Dascii --remote-encoding=3DISO-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=3D links.