4
i need to develop a javascript code that is not working.
My need is this:
When the user accesses a given page, I would like to complement the URL with some parameters, example:
If the domain is xxx.com.br/index.php, redirect it to xxx.com.br/index.php&variable=1
Remembering that it can also enter a subdirectory, example:
xxx.com.br/folder/index.php, should also add xxx.com.br/folder/index.php&variable=1
Basically, if the domain coicidir, it adds a variable at the end.
Important detail, I did this and the same was in loop, because when redirecting it identifies the domain in the same way, therefore, if the domain hits, must have another check to see if there is no parameter in the URL.
Tried to
document.URL
??– Antony Alkmim