S
S
sluchetsya2015-11-14 02:00:00
Joomla
sluchetsya, 2015-11-14 02:00:00

How to properly set up a Redirect 301?

There are pages like sites.ru/category/article.html%3Fstart%3D10 all pages with the end of this type %3Fstart%3D10 should be redirected to pages with the end ?start=10 , that is, the address should become sites.ru/category/ article.html?start=10 Tried several ways but none worked

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
NoraY, 2015-11-19
@NoraY

article This www.goinflow.com/setting-up-301-redirects-for-dyna... will help you to easily redirect these type of urls very easily.

V
Vladislav Startsev, 2015-11-19
@esvlad

I think it's better through htaccess, but it would be better to figure out why such a url is created at all.
Also, do you use Drupal? If yes, then there is a similar error.
Or, as an option, read in $_SERVER['REQUEST_URI'] then write a check for these codes '%3F', '%3D' and replace them with symbols, then create a new link and then redirect with a regular header redirect

header("HTTP/1.1 301 Moved Permanently");
header("Location: novaya_ssilka");

Read more about htaccess & php redirects here .

S
sluchetsya, 2015-12-15
@sluchetsya

Found the answer https://www.webmasterworld.com/apache/4138119.htm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question