Przekierowanie na inną stronę: Różnice pomiędzy wersjami
Z ToProste
(→.htaccess) |
m |
||
Linia 11: | Linia 11: | ||
− | ====php==== | + | ==== [[php]] ==== |
<syntaxhighlight lang="php"> | <syntaxhighlight lang="php"> | ||
Linia 30: | Linia 30: | ||
− | ====[[.htaccess]]==== | + | ====[[.htaccess| htaccess]]==== |
<syntaxhighlight lang="dos"> | <syntaxhighlight lang="dos"> | ||
Options +FollowSymLinks | Options +FollowSymLinks | ||
RewriteEngine on | RewriteEngine on | ||
RewriteRule (.*) http://nowy_adres/$1 [R=301,L] | RewriteRule (.*) http://nowy_adres/$1 [R=301,L] | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | ==== wiki ==== | ||
+ | <syntaxhighlight lang="dos"> | ||
+ | #REDIRECT [[nazwa_strony_w_to.proste]] | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Wersja z 00:15, 26 maj 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]
wiki
#REDIRECT [[nazwa_strony_w_to.proste]]