Editing the redirects
A text file for redirects contains all defined redirects and lists them in a table. You can use these abbreviations for automatic linking of defined abbreviations, for example.
Operation
You can edit the redirects within the 'Draft' tab.
Redirects are used, for example, to redirect calls to paths that no longer exist to the currently correct and available paths or for short links.
The mask supports the following validations:
- red highlighted field
... to make other paths (e.g. /other/. ..) recognizable if redirects are used exclusively within the current project (e.g. /en/. ..) - Field with yellow background
... to identify paths of existing files
These are not supported with regard to forwarding, which is pointed out at the top of the page.
'Path':
In the "Path" field, enter the path to be redirected (e.g. /en/impressum.php) starting from the corresponding content project (e.g. /en/impressum.php).
The software also supports hiding the project directory. However, enter the path with the main directory (e.g. /en/dataprotection.php for redirects from /dataprotection.php).
Non-existent paths outside the project directory are supported if the option"Allow redirects outside the project" is activated and the required htaccess definition exists (see below).
'Target':
In the "Destination" field, use the selection arrow to select the file path to which you want to redirect.
'Type':
You can use this selection box to specify which type the redirect should have defined:
- Standard (permanent)
The redirect is given an HTTP status stored in the system. This is currently status 301. - Permanently valid
The redirect is given an HTTP status of 301. - Temporarily
The redirect is given an HTTP status of 302.
'Up arrow':
Click on this button to move the current line up one position.
'Down arrow':
Click this button to move the current line down one position.
'Copy':
Click this button to copy the current row.
'Delete':
Click this button to delete the current row.
The button is not available in the first row, as this may not be deleted.
'Allow forwarding outside the project':
If this parameter is activated, the mask also supports paths outside the current project path (e.g. /imp) with regard to validation. There is then no validation note for the field.
For the redirect to take effect, a .htaccess file with a reference to a Weblication® 404.php file must be available at the top level (DOCUMENT_ROOT of the domain) (see the following source code example for project path /en).
Auszug aus /.htaccess
ErrorDocument 404 /de/wGlobal/content/errordocs/404.php
'Notes':
If pages with offline status are also to be redirected, this can be enabled by activating the following option (change false to true):
// If a page is offline, Weblication tries to redirect to the appropriate page.
$preVars['tryToRedirectIfOffline'] = false;