EXT:redirect_generator
Import redirects from CSV, add single redirects via CLI, and export all existing redirects — with optional e-mail notifications and scheduler support.
Import and export without CLI: EXT:redirect_generator_ui extends this extension with backend modules for import and export directly in the browser.
Import redirects from CSV, add single redirects via CLI, export all existing redirects. On import, TYPO3 page targets are resolved automatically via routing configuration; on export, t3://page?uid=… references can be resolved to real URLs.
CLI Commands
Add a Single Redirect
./bin/typo3 redirect:add /old-url https://example.com/new-url
./bin/typo3 redirect:add /old-url https://example.com/new-url --status-code=301 --dry-run
The target must be a page reachable via TYPO3 site configuration. External URLs that do not match any configured TYPO3 site are rejected. This command cannot be run as a scheduler task.
Import from CSV
./bin/typo3 redirect:import /path/to/file.csv
CSV format:
source;target;status_code
/old/path;https://example.com/page;301
/another;https://example.com/other;307
An optional external column (0/1) marks targets that should not be resolved against TYPO3 pages. Rows with x as the target value are skipped silently.
Options: --dry-run, --external-domains, --delete-file
The command returns different exit codes: 0 on success, 1 for warnings (e.g. non-conflicting duplicates), 2 on errors. Duplicate redirects are categorised as “conflicting” (blocking) or “non-conflicting” (harmless) and reported separately.
Export All Redirects
./bin/typo3 redirect:export export.csv --transform-target-url
--transform-target-url resolves internal t3://page?uid=… references to real URLs.
E-Mail Notifications
Configure in the extension settings:
- notification_email: comma-separated list of recipients
- notification_level:
0errors only,1warnings and errors,2all messages - allow_empty_import_file: silently skip empty imports instead of throwing an error
Import and export can run as TYPO3 scheduler tasks (Execute console commands).
Requirements
| Package | Version |
|---|---|
| TYPO3 CMS Core | ≥ 12.4 |
| EXT:redirects | ≥ 12.4 |