'Redirect doesn't work for codeplex from 000webhost.com

I am making a website to public my project that is on adhoc.codeplex.com but when i am linking download button to the codeplex, instead of redirecting to codeplex it stop loading and display nothing. I'd tried both method:

1) Linking download button to codeplex via:

<a href="https://adhoc.codeplex.com">Download</a>

2) Redirecting through php via :

<?php
    header( 'Location:https://adhoc.codeplex.com' );
?>

My working website is on www.adhoc.co.nr. What can I do please suggest something ?



Solution 1:[1]

You're most likely getting an error that stops execution of the header() - probably "headers already sent."

Two ways to go about it;

  • Don't output anything before the header()
  • Use a meta refresh

<meta http-equiv="refresh" content="0;URL='https://adhoc.codeplex.com'" />

Solution 2:[2]

is header already sent error in 000webhost?
you must update your .htaccess file with following lines of code...
php_value display_errors 1
php_flag output_buffering on

Solution 3:[3]

use echo "<script>window.location.replace('https://adhoc.codeplex.com');</script>"; instead of header( 'Location:https://adhoc.codeplex.com' );. it will definitely work.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ???
Solution 2 Himanshu Kumar
Solution 3 rafiulah