The URL Replacer Tab is designed for handling general redirects by matching specific strings or patterns in working URLs and replacing them with another string, allowing for custom redirection paths. Unlike the broken link handling, this feature works for live, working URLs, making it ideal for restructuring or updating URL patterns while maintaining functionality.
Key Features:
- String Matching in Working URLs: Matches a specific string or pattern in URLs that are already working.
- URL Replacement: Automatically replaces the matched string with the new string you specify.
- Redirection for General Links: Redirects the user to the updated path for general redirects, not for handling 404 broken links.
How It Works:
- Define a Rule: In this tab, you can set up a rule where a specific part of a working URL is matched and replaced with a new string.
- Automatic Redirection: When a user visits a URL that matches the rule, the system automatically replaces the matching part and redirects to the new URL.
- Subpath Support: The replacement applies to all sub-paths under the matched URL, ensuring consistent redirection across similar URLs.
Example Setup:
For instance, if you set the following rule:
- Match URL Part: demo
/windows
- Replace With: demo
/laptop-notebook/windows
When a user visits:
- Loaded URL:
https://opencart-demo.huntbee.com/demo/windows
- Redirected URL:
https://opencart-demo.huntbee.com/demo/laptop-notebook/windows
Additional Examples:
Loaded URL | Redirected URL |
---|---|
https://opencart-demo.huntbee.com/demo/windows | https://opencart-demo.huntbee.com/demo/laptop-notebook/windows |
https://opencart-demo.huntbee.com/demo/windows/hp | https://opencart-demo.huntbee.com/demo/laptop-notebook/windows/hp |
This feature ensures URLs are properly managed and redirects users to the correct pages, reducing the chance of 404 errors.
Important Notes:
- Enable URL Replacer: For this functionality to work, you must enable “URL Replacer” in the extension settings.
- Not for 404 Handling: This feature is specifically for general redirects and does not apply to 404 broken links. To manage 404 links, use the Broken Links Tab.
- Website Level Redirection: This feature works at the OpenCart website level, not the server level (like
.htaccess
redirects).
By enabling URL Replacer, you ensure that even working URLs can be updated or restructured seamlessly without disrupting user access, helping to maintain an organized URL structure.