Home / Uncategorized / Methods for URL Redirecting and Rewriting :
SEO Services in Delhi | SEO Services India

Methods for URL Redirecting and Rewriting :

There are many possible ways to implement redirects. On Apache web servers (normally present on machines running Unix or Linux as the operating system), it is possible to implement redirects quite simply in a standard file called .htaccess using the Redirect and RedirectMatch directives (learn more about this file format at http://httpd.apache.org/docs/2.2/howto/htaccess.html). More advanced directives known as rewrite rules can be employed as well using the Apache module known as mod_rewrite, which we will discuss in a moment.

On web servers running Microsoft IIS (http://www.iis.net/), different methods are provided for implementing redirects. The basic method for doing these redirects is through the IIS console (you can read more about this at http://www.mcanerin.com/EN/articles/301-redirect-IIS.asp). People with IIS servers can also make use of a text file with directives provided they use an ISAPI plug-in such as ISAPI_Rewrite (http://www.isapirewrite.com/), and this scripting language offers similar capabilities as that of Apache’s mod_rewrite module.

Many programmers use other techniques for implementing redirects. This can be done directly in programming languages such as Perl, PHP, ASP, and JavaScript. The key thing that the programmer must do, if he implements redirects in this fashion, is to make sure the HTTP status code returned by the web server is a 301. You can check the header returned with the Firefox plug-in Live HTTP Headers (http://livehttpheaders.mozdev.org/), with a Chrome extension (http://www.ayima.com/seoknowledge/redirect-checker.html). or a web-based server header like (http://tools.seobook.com/serverheader-checker/).

Another method that you can use to implement a redirect occurs at the page level, via the meta refresh tag, which looks something like this:

<meta http-equiv=”refresh” content=”5;url=http://www.yourdomain.com/newlocation.htm” />

The first parameter in the content section in the preceding statement, the number 5, indicates the number of seconds the web server should wait before redirecting the user to the indicated page. This gets used in scenarios where the publisher wants to display a page letting the user know that he is going to get redirected to a different page than the one he requested.

The problem is that most meta refreshes are treated as though they are a 302 redirect. The sole exception to this is if you specify a redirect delay of 0 seconds. You will have to give up your helpful page telling the user that you are moving him, but the search engines appear to treat this as though it were a 301 redirect (to be safe, the best practice is simply to use a 301 redirect if at all possible).

Read More : Digital Marketing Services in Delhi

PHP Assignment Help in USA and Canada

About admin

Check Also

Manual Social Media Link Creation :

One way to create links manually in social media environments is by visiting social media …

Leave a Reply

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

4 + 3 =