Internet review - Lite Web-master Graphics Games Freeware Time Christmas Bible
Website Hosting Clouds Domains Resources Forms on the site Promotion
ASCII HTML robots.txt SEO Validators Webmasters Web Editors Icon Generator Internet Links

Redirect

.htaccess

Redirect 301/old/old.htm http://www.you.com/new.htm
/old/old.htm - the path and name of the old page.

Became a classic task of merging the names of the site with www and without it, is solved this way:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite\.com
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [R=permanent,L] . 
Or an alternative syntax:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
The designation [R=301,L] means: redirect the client and send him the status code 301 (R=301) and make this rule last (L).

Meta

<meta http-equiv='refresh' content='0'; url=http://newdomain.com'>
Page refresh function.
Content specifies the number of seconds after which the update will take place.

PHP

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.newdomain.ru/newdir/newpage.htm");
exit();
?>

JavaScript

For example, automatically make a Click on the "Submit" button of the "searchform" form in 0.1 sec after loading the code:
<input type=submit setTimeout('document.forms["searchform"].Submit.click()', 100);>
location="http://www.newdomain.com"; 
document.location.href="http://www.newdomain.com"; 
window.location.reload("http://www.newdomain.com"); 
document.location.replace("http://www.newdomain.com");
In the latter case it will not be possible to return to the page that performed the redirection, since its address is erased from history, which was once needed.

For a web master Textbooks, reference books .htaccess CHMOD ERROR - table return codes 404 META tags CSS MySQL cribs robots.txt Protection from auto-fill forms

Validity
Soft
Web soft Best web-based utility Online WYSIWYG WAP software
Favicon
Favicon Editors icons Icon Generator online Generator icons for online smartphone
RSS
RSS Examples of RSS Example Atom-document



Mobile version

Terms of publication of the article
Advertising
About us
Graphics

Fonts
Logos
Brandbooks
Pictogramms
Heraldry

Popular

Check a website level
A website registration
How to creat a website
#1 on Google
Online Translators
Password

Internet top

©2005-2024, Web studio Ph4 - Internet Catalog for user, web-master and designer v. 6.0.3