Jump to content

Redirecting Problems


Drezard

Recommended Posts

Okay, this code doesnt work. When it redirects it doesnt add the /. It just goes installindex.php. CODE: (Whats wrong?)

 


<html>

<head>

<script type="text/javascript">

function redirect(file) {

	window.location = file

}

</script>

</head>

<body>

<script type="text/javascript">

   redirect('install/index.php')

</script>

</body>

</html>

 

Thanks, Daniel

 

Link to comment
https://forums.phpfreaks.com/topic/74965-redirecting-problems/
Share on other sites

Okay, this code doesnt work. When it redirects it doesnt add the /. It just goes installindex.php. CODE: (Whats wrong?)

 


<html>

<head>

<script type="text/javascript">

function redirect(file) {

	window.location = file;

}

</script>

</head>

<body>

<script type="text/javascript">

   redirect('install\/index.php');

</script>

</body>

</html>

 

Add semi-colons and probably escape the '/' (although I've never seen it happen before.)

 

Link to comment
https://forums.phpfreaks.com/topic/74965-redirecting-problems/#findComment-379109
Share on other sites

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.