Przekierowanie na inną stronę: Różnice pomiędzy wersjami
Z ToProste
(→js) |
|||
Linia 24: | Linia 24: | ||
<script> | <script> | ||
− | window.location = "http://nowy_adres/" | + | window.location = "http://nowy_adres/" |
</script> | </script> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
====[[.htaccess]]==== | ====[[.htaccess]]==== |
Wersja z 19:59, 25 mar 2011
Przekierowanie na inną stronę stronę www można zrealizować to na kilka sposobów.
Spis treści
html
<head> <meta http-equiv="refresh" content="5;url=http://nowy_adres/"> </head>
php
<?php header('location: http://nowy_adres/'); ?>
js
<script> window.location = "http://nowy_adres/" </script>
.htaccess
Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://nowy_adres/$1 [R=301,L]