REDIRECT
What does the Redirect directive do?
Maps an old URL to a NEW URL, forcing the client to request the new URL.
is there any rule?
Yes.
* the old URL must ALWAYS start with “/”.
* the new URL must be written in its absolute form.
Some examples:
Code
x
Redirect /research http://www.google.com.br
When requesting http://botafogo.exemplos.com.br , there will be a redirect to http://www.google.com.br
Can I make this redirect permanent for the client.
Code
x
Redirect permanent /melhorblog https://botafogo.wordpress.com
Redirect /musicas http://www.srv.com/musicas
Redirect / https://botafogo.exemplos.com.br/
Redirect /musicas http://www.srv.com/musicas
Redirect / https://botafogo.exemplos.com.br/
Like Alias, Redirect also has a regular expression directive, RedirectMatch.
Example:
Code
x
RedirectMatch (.*).avi$ https://avi.exemplos.com.br/$1
To redirect individual files like example.com/oldfile.htm to newfile.htm you can use a 301 redirect like this:
Code
x
Redirect 301 /oldfile.htm /newfile.htm
Redirect 301 /oldfile.htm http://example.net/newfile.htm
Redirect 301 /oldfile.htm http://example.net/newfile.htm
What is the 301 Redirect?
The Redirect 301 is an instruction on the server that Page A is now Page B so that when the visitor lands on Page A they will automatically be forwarded to Page B's address.
It is through this mechanism that when you access unibanco.com.br you land on itau.com.br and also when you access www.vvcestudio.com.br you land on vvcestudio.com.br.
what is apache