Friday, 15 May 2015

javascript- redirect page in the same directory of my website -



javascript- redirect page in the same directory of my website -

i have redirect page page,but in same directory. example: www.test.com/demo/test.php have redirect :

www.test.com/demo/check.php

and because have lot of environment dev qa production have maintain origin of path , redirect page.

if write:

function redirect (){ document.location = '/check.php'; //redirect me www.test.com/check.php }

thanks.

i'm not sure you're asking here, if if you're asking how redirect file in same directory, remove / code.

function redirect (){ document.location = 'check.php'; }

javascript

No comments:

Post a Comment