URL redirect
URL Redirect can be needed for many reasons.
You may want to redirect you’re your_site.com to www.your_site.com or the other way around so that search engines don't see them as two different sites.
You may have an old file that has SERP but you have changed your directory structure and you want to leave that file in place but point it to the new file.
Or perhaps you have purchased some new domains and you want to forward them all to your_site.com.
There can be lots of reasons to do URL redirects.
Coldfusion URL Redirect
Coldfusion URL Redirect is about as short as they get.
<cflocation url="http://www.your_site.com">
This code also takes you to the redirected page.
PHP URL Redirect
PHP URL Redirect is just like it says. The code for this script is short and simple. The following code goes at the top of the page.
<?php header("location:http://www.your_site.com/index.html"); exit; ?>
This script shows the new page that the refresh points to.
ASP URL Redirect
ASP URL Redirect does the redirect quite quickly. The code goes at the top of the page.
<%@ Language=VBScript %> <% Response.Status="301 Moved Permanently" Response.AddHeader "Location", "http://www.your_site.com/index.html" %>
This code also takes you to the redirected page.
Javascrip URL Redirect
<script type="text/javascript">document.location.href='www.your_site.com/index.html'</script>
This code also sends you to the redirected url.
Advertisement


