Home » Wapka Codes 2021 » Checking if the current page starts with certain text
francisco 3 years ago |
You can detect if the user is accessing a page that starts with a specific text using the URL_PATH and IFMATCH functions. An example of use is to redirect users to the home page if they directly access the /header/ and /footer/ pages. See comment to read more...
comment |
Recent Comments (2)
francisco | 3 years ago |
You can detect if the user is accessing a page that starts with a specific text using the URL_PATH
and IFMATCH
functions. An example of use is to redirect users to the home page if they directly access the /header/ and /footer/ pages. See how it works:
:VAR(URL_PATH).IFMATCH(^/header).THEN.GOTO(/index/).ELSE.NULL;
The IFMATCH
function is a powerful application of regular expressions and can be used to create very complex code.
reply |