Specifically if the base url is 'www.webpage.com', I would like to add '\index.php\animals' and then a variable '?delete=true'.
So far my code looks like this:
var urlRedirect = location.host + '/index.php/animals?delete=true'; window.open(urlRedirect,"_self",false);
If I use an alert to view urlRedirect I can see the entire url I would expect eg www.webpage.com/index.php/animals?delete=true but the page is not opening where I want. It is just going to be the base url, I suspect the default page if a weird url is entered.
What code should I use to do this?