Hi!
I want to link a button to another webpage. What i want is my domainname/folder/page/a function to direct to the other page
I thought that by doing a folder/page/index.php what directs to another page is a solutuon… now i tried this but nothing is happening…
nothing… white page… can someone please give me the code to let me open another url
@SEE: when you post code on the forums, you need to format it so it will display correctly.
You can highlight your code, then use the </> button in the editor window, or you can place three backticks ``` (top left key on US/UK keyboards) on a line above your code, and three on a line below your code. I find this approach easier, but unfortunately some European and other keyboards don’t have that character.
its a CMS, (osclass template) and in the back end i can put in a url to direct within the page,… /content/page it will direct to a specific page, but i want to direct to an external different page.
I simply made an HTML to open that page.
here is the code…
<!doctype html>
<html>
<head>
<title>Atmos4u</title>
<meta http-equiv="Refresh" content="0; url=http://www.atmos4u.gr">
<!-- If the meta tag doesn't work, try JavaScript to redirect. -->
<script type="text/javascript">
window.location.href = "http://www.atmos4u.gr"
</script>
</head>
<body>
<!-- If JavaScript doesn't work, give a link to click on to redirect. -->
<p>If you are not redirected automatically, click <a href='http://www.atmos4u.gr'>here</a>.</p>
</body>
</html>
(hey thanks Technobear !! worked with the ``` !)
HOW can you make it open in a new window?
-now my question, is there any reason to do that with php instead? it wors as it works now, and if yes with php, what exactly would be the code (complete copy of the example there)
thanks!
The question is: How and why you want a redirect.
The page appears to have no purpose other than to redirect to somewhere else, so I would think there is no real reason for the page to even exist and just have a redirect in .htaccess to redirect that url as @Mittineague mentioned.
The php header should work, but that function must come before any html is output by the script. If that redirect is always to happen, then there is no use in the script subsequently outputting any html if the redirect has already happened, so again begs the question of why it should exist in the first place and not just be a server redirect.
that’s the page, please take a look… below the slider, if you click “περισσοτερα…” It should bring you to the sponsor page… whats the correct way to do it?
Is there a reason why you can’t just link directly to the site in question? Personally, I dislike clicking what appears to be an internal link and then finding myself unexpectedly on another site.