J
J
Jidos972021-02-10 11:41:53
URL Handling
Jidos97, 2021-02-10 11:41:53

Is it possible to do a mass redirect of links?

The question is that from an existing link in the browser a non-existent one is substituted, let's say:
The link exists and is displayed now: explame.com/element/nameURL .
A link that doesn't actually exist, but should be displayed in a browser: explame.com/catalog/nameURL .

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Emelyanov, 2021-02-10
@babarun

See .htaccess
file rewrite without redirect. To do this, simply do not specify the redirect flag (R), and we get the desired result, now we will get news.html at the address news/happy, and news/happy will remain in the address bar
RewriteRule ^news/happy.* /news.html [L]
Also read this https://dev.1c-bitrix.ru/ api_help/main/general/url...

V
Viktor Taran, 2021-02-10
@shambler81

In Bitrix, you cannot remove the first element, since this is an infoblock. there can be any name but this does not change the essence.
so it is impossible to remove it completely, as well as to take the same information from different infoblocks.
If you need them to open at two URLs, then this is request cannibalization and this is also a so-so solution.
however, you can do the following
: 1. make a redirect with code 200 instead of 301 to such urls.
2. place it to the CNC
everything
. Better yet, write why you need it, because you are doing some kind of game, maybe what you are trying to do can be done in a normal way

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question