Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

exp:expurlfrom404

Start a URL map from the not-found log: the addresses visitors asked for and did not find, the most asked first, as rows to fill in.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/commands/expurlfrom404.md

On this page

exp:expurlfrom404

Start a URL map from the not-found log: the addresses visitors asked for and did not find, the most asked first, as rows to fill in.

Script bin/php/expurlfrom404.php, code in kernel/private/classes/commands/expurlfrom404.php. Run it from the installation root, as the user the web server runs as:

./console exp:expurlfrom404 --help
./console exp:url:from-404 --help
php bin/php/expurlfrom404.php --help

Help text

Start a URL map from the not-found log
Reads the log of pages not found (var/log/404.log and its rotated files, written while site.ini
[RequestLogSettings] NotFoundLog=enabled, the default), or with --log web server access logs, and
writes every address that answered 404 or 410 once, the most asked first, as a row with an empty
new_url and the hits in its note. Assets, bots and methods other than GET and HEAD are left out;
-s keeps the lines of one siteaccess. The log hides query values, so only the path counts there.

./console exp:url:from-404 --min-hits=3 --since=30d --output=var/tmp/not-found.csv
./console exp:url:from-404 -s site --limit=200 --output=var/tmp/not-found.xlsx
./console exp:url:from-404 --log=/var/log/nginx/access.log.1.gz --format=json

Options

OptionValueHelp
--outputrequiredThe file to write (default the standard output; needed for xlsx and ods)
--output-formatrequiredimport, export: what the command prints, text (default) or json (the machine output exp-url/1); --format is the file's format there; from-sitemap, from-404, suggest: the format of the file written (csv, json, xlsx, ods, apache, nginx; default from --output, else csv)
--formatrequiredimport: the format of the file (csv, json, xlsx, ods, apache, nginx; default from its name or content); export: the format to write (default from --output, else csv); batches, undo, from-sitemap, from-404, suggest, test: text (default) or json (the machine output exp-url/1)
--min-hitsrequiredfrom-404: only addresses asked for this many times or more (default 1)
--sincerequiredfrom-404: only requests since this date (2026-11-01) or this long ago (30d, 12h, 2w)
--limitrequiredbatches: how many of the last imports to list (default 20); from-sitemap, from-404, test: the most rows (default all)
--include-assetsfrom-404: also images, scripts, style sheets, fonts and files below /var/, /design/ and /extension/
--include-botsfrom-404: also the requests of bots and crawlers
--logrequiredfrom-404: read these logs instead of this installation's not-found log: 404.log files or web server access logs in the common or combined format, .gz too (a comma list or repeated)

Read from the option definitions in the code (startup(), getOptions(), options() or ezcConsoleOption). Every script also takes the standard options of the script framework (--help, --siteaccess, --debug, --quiet, --allow-root-user ...).


Generated by ./console exp:help:examples from bin/php/expurlfrom404.php, kernel/private/classes/commands/expurlfrom404.php. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x