I’m new to PHP. I was searching for a solution on the internet already but didn’t find anything for my problem.
I have a small list with links/bookmarks to external websites. I don’t wan to link them directly. I want to create a redirect page.
A) My links are shown like that:
B) My redirect.php file contains:
C) If I click on the link shown above the following error message appears:
I already checked the syntax but didn’t find any errors which causes the message from above.
Any suggestions to solve the problem? Or do I have to choose another solution for my redirect problem?
Thanks a lot,
The superglobal variable $_GET is only used to collect information from a form that is sent with method="get"
So if you you just a URL inside <li> tags and then attempt to grab that, it won’t work.
Maybe try something kind of like this…
Your HTML form:
Where would you like to go?
Your redirect.php page
print 'Error redirecting!';
Thanks a lot for reply!
The problem I do have is, I have to put the links in a list (<li>). I can’t collect them in a pulldown menu.
Is there another solution for redirecting pages?
I found a solution…
1. Create a page redirect.php:
$url = $_GET;
2. Create a robots.txt file and write:
In the page where you list all of the links you, write the following code:
4. That’s all!
You must be logged in to reply to this topic.