LATEST >>

Welcome Here And Thanks For Visiting. Like Us On Facebook...

EXEIdeas – Let's Your Mind Rock » Website / Website Tips » How To Generate 301 Redirect Rules In All Language?

How To Generate 301 Redirect Rules In All Language?

301-Redirect
Setting up 301 redirects is a common SEO activity to fix broken link problems or to do a site move. This online tool helps you create those redirects on the popular Apache server used by most hosting providers. CMS systems like WordPress, Joomla and Magento are normally on this type of server.

301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It’s not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it’s the safest option. The code “301” is interpreted as “moved permanently”.

So here we are sharing some languages 301 redirect codes that you can use to redirect your deleted or moved web pages to make better SEO so now move ahead and garb the code.

PHP Redirect:

<?php
// PHP permanent URL redirect - generated by www.rapidtables.com
header("Location: http://www.mydomain.com/new-page.html", true, 301);
exit();
?>

ASP Redirect:

<%@ Language="VBScript" %>
<%
' ASP permanent URL redirect - generated by www.rapidtables.com
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.mydomain.com/new-page.html"
Response.End
%>

ASP.net Redirect:

<script language="C#" runat="server">
// ASP.net permanent URL redirect - generated by www.rapidtables.com
private void Page_Load(object sender, System.EventArgs e)
{
 Response.Status = "301 Moved Permanently";
 Response.AddHeader("Location","http://www.mydomain.com/new-page.html");
 Response.End();
}
</script>

.htaccess Redirect:

# Permanent URL redirect - generated by www.rapidtables.com
Redirect 301 /old-page.html http://www.mydomain.com/new-page.html

HTML Redirect:

<!DOCTYPE html>
<html>
<head>
<!-- HTML meta URL redirect - generated by www.rapidtables.com -->
<meta http-equiv="refresh" content="0; url=http://www.mydomain.com/new-page.html">
</head>
<body>
</body>
</html>

JavaScriptRedirect:

<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
 // Javascript URL redirection - generated by www.rapidtables.com
 window.location.replace("http://www.mydomain.com/new-page.html");
</script>
</body>
</html>

Last Words:

This is what we have and shared in easy steps for newbies so that they can easily know how it works. Stay with us because we are going to share alot more about coding and make it easy for you. If you liked it then share it and be with us to get next awesome snippets. If you have any problem then feel free to ask us. We will help you with what we can or have.

You Like It, Please Share This Recipe With Your Friends Using...

2 Responses to “How To Generate 301 Redirect Rules In All Language?”

  1. MD. Shafiqul Islam says:

    This is a awesome post for web designer and It’s help us how we use HTML language in a web site. Thanks for shearing.

Leave a Reply

Your email address will not be published. Required fields are marked *