htaccess redirect 301 URL that does not exist

Asked

Viewed 122 times

1

There was an old site and all its Urls were changed.

A URL that was well found in Google was:

meudominio.com/datacenters

Now I want to redirect this URL to:

meudominio.com/data-centers

In htaccess I did:

redirect 301 /datacenters /data-centers

But it won’t, what I’m doing wrong?

1 answer

0

Try this way it should work.

Redirect 301 /meudominio.com/datacenters.html http://meudominio.com/data-centers.html

Another example: 301 redirect with . htaccess

redirect 301 /diretorio/antigo_arquivo.htm http://www.exemplo.com.br/novo_arquivo.htm

Redirect 301 /pagina-antiga.html http://meudominio.com/folder/

Reference link https://www.carti.com.br/como-fazer-redirecionamento-301/

  • It will not.... I have seen this example before. The browser URL remains the same (the one that no longer exists)

  • @caiocafardo give a look at the second example. Look if it works Redirect 301 /pagina-antiga.html http://meudominio.com/folder/

  • Also not... the right thing was anything I put '/test' should redirect to the URL that is after, right?

  • Here is a super short article, with only direct examples. If that doesn’t work, I won’t know how to help you... https://css-tricks.com/snippets/htaccess/301-redirects/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.