A
A
Adel Abuhasira2017-03-09 21:55:00
PHP
Adel Abuhasira, 2017-03-09 21:55:00

How to make a 301 redirect without htaccess?

Good afternoon, there was a need to move from one domain to another. In "redneck hosting" there is no access to site files, as well as to .htaccess, so there is no way to glue sites together with a 301 redirect through .htaccess. Perhaps there is another way? Maybe I can paste the code somewhere in the html of the page.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Burov, 2017-03-09
@BuriK666

<meta http-equiv="refresh"
   content="0; url=http://example.org/new-page.html">
HTML redirect. HTML meta refresh redirection code.
HTML meta refresh redirect is a client side redirect and is not 301 permanent redirect.
The HTML meta refresh with 0 seconds time interval, is considered by Google as a hint for 301 redirect for pagerank transfer.
If you want to do real 301 permanent redirect, you can do it with PHP redirect after enabling PHP code in HTML files.

header("HTTP/1.1 301 Moved Permanently"); 
header("Location: http://example.org/new-page.html");

www.rapidtables.com/web/dev/html-redirect.htm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question