Redirect if QueryString exists
Hi,
I am using below code. It works fine when no url query string but when url query string is specified then it's just reloading the same page with no error in google console.
can you help please..
- success: function()
- {
- if (window.location.href.search("[?&]url=") != -1) { window.location.href = redirect; }
- else window.location.href = 'index.php';
- },