Jump to content

Archived

This topic is now archived and is closed to further replies.

techiefreak05

redirect code help!

Recommended Posts

I have iths code thats supposed to redirect from

http://zycoworld.com/index.php?user=USERNAME
==>
http://zycoworld.com/USERNAME


heres my index.php code::
[code]<meta http-equiv="refresh" content="0;url=http://zycoworld.com/<?php $_GET['user'] ?>">
[/code]

it deosnt work. it just redirects to my zycoworld.com/index.php page

Share this post


Link to post
Share on other sites
try this:
[code]
<meta http-equiv="refresh" content="0;url=http://zycoworld.com/<?php echo $_GET['user']; ?>">
[/code]

you didnt echo it. so its just a blank php code pretty much.

Share this post


Link to post
Share on other sites
[code]<?php
header("Location: http://zycoworld.com/{$_GET['user']}");
?>[/code]

is better.

Share this post


Link to post
Share on other sites
only because it re-directs without loading the page first. depends what he wants, but that is better.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.