Automatic Redirect Snippets


If you're looking for a great way to enable your visitors to navigate your web site, this JavaScript drop down box with automatic redirect may be what you're looking for. This JavaScript code will enable your visitors to click on a drop down box to select the location on your web site in which they would like to navigate. Once they make their...

12 March, 2017   

PHP code snippet for Automatic Mailto Links

26 February, 2011   

This redirects visitors to a new URL using a 301 redirect. Using a 301 redirect is the safest way to let search engines like Google, Yahoo!, Live and Ask know your address has changed.

You should use err_headers_out() and not headers_out() when you want to send cookies in the REDIRECT response.

16 June, 2012   

You can use JavaScript window.location to redirect a visitor to a required page. You may have seen this feature used by sites with full page ads, or to redirect visitors to the site's new domain name. You can add also a timer to the script that will allow the page to redirect and the visitors will not need to click a link or type in the new URL.

30 April, 2011   

This allows you to redirect the page using meta tag. Setting content to 0 for immediate redirect.

08 June, 2011   

Did you know that search engine crawlers think that 'www.yoursite.com' and 'yoursite.com' are two different websites!? We need to help the crawlers out and tell them that the two URLs are the same. We can do this with a 301 (moved permanently) redirect. The code below will redirect requests for 'yoursite.com' to 'www.yoursite.com .

07 February, 2011   

Automatic Copyright Year

24 October, 2016   

You should NOT use this if you are ACTUALLY using WordPress.

11 May, 2013   

ASP code example using a 301 redirect

The JavaScript is just a function called redirect, and is requesting that a variable be passed to it.

29 December, 2011   

ASP code example to redirect the user to a different URL.

20 March, 2013   

ASP code example for Moved Permanently 301 Redirect

MS SQL triggers for automatic Create and LastModified Dates

15 September, 2012   

This script shows how to redirect to a specific site.

15 March, 2015   

How to automize versioning by modifying a line in the AssemblyInfo file.

Sometimes you need to generate passwords for customers automatically when a new account is created. This code allows you choose the desired length and strength for the password and it is very flexible.

PHP code example for redirecting from old URL to new URL

16 February, 2012   

ASP code to ban user based on their IP address

23 February, 2013   

This is a really generic Not-WWW to WWW configuration script.