A purchased news site script, written on the CodeIgniter framework Version 4.5.7.
When creating Categories/subcategories, pages, and posts, the SLUG field is used, where you can add words and a group of letters and numbers (excluding signs, special characters, separators, etc.), which are later used to obtain the URL address for this page on the site.
What needs to be done:
1. Add the ability to use any characters, signs in the SLUG field so that all this value of the slug field is used in the URL of this page.
Here are a few examples:
First (simple)
SLUG field: threads/31860/
URL on the site: site.com/threads/31860/
Second (complex)
SLUG field: c_home/dom_pages?&p=all&s=all&lim=5000&&off=0&d_id=1992&d_name=hibiny.pro&WebArchive=1
URL on the site: site.com/c_home/dom_pages?&p=all&s=all&lim=5000&&off=0&d_id=1992&d_name=hibiny.pro&WebArchive=1
The main thing is that such a URL should be primary, not a duplicate, to which a redirect is made from the main URL!
These URLs should be used throughout the site and in the site generated by the script.
The full version of the task is in the attached file.