how can i add something in javascript that will check the website url of someone on a website and then redirect to a certain page on the website, if a match is found? for example...
the string we want to check for, will be mydirectory, so if someone went to mysite.com/mydirectory/anyfile.php or even mysite.com/mydirectory/index.php javascript would then redirect their page / url to mysite.com/index.php because it has mydirectory in the url, how can i do that using javascript?