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

Suggest new targets for the rows of a URL map that have none, by how alike their old address is to the addresses and names of this site's pages.

Download as PDF

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

On this page

exp:expurlsuggest

Suggest new targets for the rows of a URL map that have none, by how alike their old address is to the addresses and names of this site's pages.

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

./console exp:expurlsuggest --help
./console exp:url:suggest --help
php bin/php/expurlsuggest.php --help

Help text

Suggest new targets for a URL map
For every row without a new_url, compares the old address (its last element most, without endings
such as .html, transliterated) with the URL aliases and names of the visible pages of the siteaccess
of -s and scores the best ones from 0 to 100. With --fill-above the best one is written into new_url
when it scores that much; the others are listed in the row's note. The map is written again, with
every row; nothing is imported.

./console exp:url:suggest var/tmp/old-site.csv --output=var/tmp/old-site-suggested.csv
./console exp:url:suggest var/tmp/old-site.csv -s site --fill-above=85 --output=var/tmp/map.xlsx
./console exp:url:suggest var/tmp/old-site.csv --top=5 --report=var/tmp/suggestions.json --output=var/tmp/map.csv

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)
--toprequiredsuggest: the suggestions per row (default 3)
--fill-aboverequiredsuggest: write the best suggestion into new_url when it scores this much or more (0 to 100; never a tie; default: never)
--min-scorerequiredsuggest: the lowest score suggested (0 to 100, default 30)
--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)

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/expurlsuggest.php, kernel/private/classes/commands/expurlsuggest.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