Jump to content

whyare my scripts failing to redirect


Recommended Posts

i have tried the following and all are not working:

 

<?php
header('Location: buses/index.html');
?>

 

<?php
header("Location: buses/index.html");
?>

<?php
header('Location: /root/buses.html');
?>

[code]<?php
header('Location: ../buses/index.html');
?>

 

but to my surprise none is working. it only works when i enter a full http url but i need to use the actual path..please help me

[/code]

Link to comment
https://forums.phpfreaks.com/topic/194957-whyare-my-scripts-failing-to-redirect/
Share on other sites

i did put your code on top of the script and i also changed the php script to this <?php header("Location: ./buses.html"); ?>and i got the following result

 

"The site you're visiting forwards the request so that it can never be finished"

 

Archived

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

×
×
  • Create New...

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.