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:expurltest

Test a URL map against a running site: request every old address, follow the redirects and compare where it lands with the new_url.

Download as PDF

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

On this page

exp:expurltest

Test a URL map against a running site: request every old address, follow the redirects and compare where it lands with the new_url.

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

./console exp:expurltest --help
./console exp:url:test --help
php bin/php/expurltest.php --help

Help text

Test a URL map against a running site
Requests every old address of the map on --base, several at a time, follows the redirects and
compares where it lands with the row's new_url: landed, wrong-status (permanent where a temporary
redirect was expected, or the other way), wrong-target, not-redirected, error; rows without a
new_url are skipped. A wildcard row is tested with a sample for its *. Ends with exit 1 when a row did
not land. Node targets (node:<id>) are compared with the node's address on the siteaccess of -s.

./console exp:url:test var/tmp/map.csv --base=https://www.example.com
./console exp:url:test var/tmp/map.xlsx --base=https://staging.example.com --insecure --report=var/tmp/test.csv
./console exp:url:test var/tmp/map.csv --base=https://www.example.com --concurrency=16 --format=json

Options

OptionValueHelp
--baserequiredtest: the site to test, https://www.example.com (needed)
--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)
--reportrequiredimport: also write the plan, row by row, to this file (.json, or .csv); suggest, test: also write every row with its suggestions or its result to this file (.json, or .csv)
--limitrequiredbatches: how many of the last imports to list (default 20); from-sitemap, from-404, test: the most rows (default all)
--concurrencyrequiredtest: the requests at the same time (default 8)
--timeoutrequiredfrom-sitemap, test: the seconds a request may take (default 15)
--max-redirectsrequiredtest: the redirects followed before a row counts as an error (default 5)
--insecurefrom-sitemap, test: do not verify TLS certificates (for test hosts with a self-signed one)

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 ...).

Arguments: [file].


Generated by ./console exp:help:examples from bin/php/expurltest.php, kernel/private/classes/commands/expurltest.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