Month: September 2021

php if url contains | if url contains php | php check if url contains string | php check if url contains | php if url contains echo somehting

Check If URL Contains String with PHP8

Sometimes we have to redirect users based on a specific keyword in the URL. Trust me we can achieve this very easily in PHP. Here you would see the code in this post. Let’s assume the URL contains events. For example  URL: https://domain.com/events/lucknow <?php if (isset($_SERVER[‘HTTPS’]) && $_SERVER[‘HTTPS’] === ‘on’ && $_SERVER[‘REQUEST_SCHEME’] === ‘https’ ) …

Check If URL Contains String with PHP8 Read More »