J
J
jorshjorsh952017-05-30 21:10:16
CMS
jorshjorsh95, 2017-05-30 21:10:16

How to make unique links?

Hello everyone, please advise.
There are links like:
site.ru/kolesa-dlya-gruzovikov/koleso-kamaz
On the page in the menu there is an inscription "Wheel MARK 10483"
You need to redirect to the page:
site.ru/kolesa-dlya-gruzovikov/marka-10483
How can this be implemented ?
The only thing is that you can’t change the routing, you need to somehow associate the current link with the new one, and redirect the current one to a link of a new type ..
I would be very grateful for the tips

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Georgy Bondarenko, 2017-06-02
@Koen777

You have several options on how to do this. Here are a couple of them:
1) Make yourself a table in the database, where there will be fields with the old link and the new one (from where to redirect and where). When loading pages, check the current url for an entry in the database, if there is, then redirect to the specified one (do not forget about GET parameters in the url and various #hash garbage)
2) There is a simpler option - use the redirect via .htaccess. Here are examples of how to do it.
It depends on the number of possible redirects on the site, if there are many of them, but the solution through .htaccess is bad

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question