Hoe kan je iemand redirecten van index.php naar index.php?p=pagina?
Vraagje over redirecten
Codeblok (HTML):
1
Codeblok (PHP):
1
header(Location: http://www.example.com/);
1
Codeblok (PHP):
1
header(Location: http://www.example.com/);
Dat werkt niet want dan refreshed die continue, ik wil dat die eenmalig van index.php naar index.php?p=pagina gaat en dan stop met refreshen.
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]p[/COLOR][COLOR= #007700]])) {[/COLOR]
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]Location: index.php?p=pagina[/COLOR][COLOR= #007700]);
}[/COLOR]
?> Bedankt, dat lijkt te hebben gewerkt.