If you want to detect only IE specific browsers, then following code help you. You need to replace the comments with the redirection code
function browser_detection_redirect(){
preg_match('/MSIE (.*?);/', $_SERVER['HTTP_USER_AGENT'], $matches);
if (count($matches)>1){
//Then we're using IE
$version = $matches[1];
switch(true){
case ($version<=8):
//IE 8 or under!
break;
case ($version==9):
//IE9!
break;
default:
//You get the idea
}
}
}
You have to call the function on WordPress init hook to redirect:
add_action('init', 'browser_detection_redirect');
To add this code on the specific page you need to use the is_page WordPress function.
Related Posts:
- How to force a 404 on WordPress
- How do I skip wordpress’s 404 handling and redirect all 404 errors for static files to 404.html?
- Disable WordPress URL auto complete
- WordPress redirecting connections on port 8080 to 80
- Disable ONLY URL auto complete, not the whole canonical URL system
- 301 redirect instead of 404 when URL is a prefix of a post or page name?
- Redirect to referring page after logging in
- Redirecting WordPress /.htaccess / HSTS / SSL
- Correct way to hide pseudo pages from being shown?
- Htaccess redirect from ‘/%postname%.html’ to ‘/%postname%’
- Redirect to post after submission with Gravity Forms? [closed]
- Redirect www to non-www htaccess
- Using redirection plugin to pass URLs as lowercase to wordpress
- Redirect to login page
- I want to redirect the url to the previous page
- Headers already sent – WordPress core
- Import WordPress Post Slug with Forward Slash
- Create a php callback/endpoint for an OAuth script
- Query WP data with the WPDB API from outside WordPress
- Get the final destination after WP_Http redirects (WordPress)
- How to redirect user to a page after form submission
- Too many redirects when using wp super cache [closed]
- How does WordPress redirect without using .htaccess?
- How to redirect from various ?page_id= to home page?
- header and wp_redirect not working. cannot modify header information warning
- Code to create a redirection after login?
- Headless WordPress redirect front-page to login page [closed]
- 301 Redirect To Post ID
- Redirect after password update
- How code a redirect back to page from form thanks
- How to add new redirection on wordpress site
- How to use Regex to add to a url?
- htaccess redirect invoice.php to /client/invoice.php
- redirecting and showing notice from previous action
- redirect wp-admin/install.php
- Make posts 410 dynamically
- Redirect homepage with htaccess, except if I enter the link adding “/home”
- How to properly encode url with parameters for redirect_to
- How to disable redirect on pagination first page
- Redirect user to a form until they have filled it out [closed]
- Buddyboss Platform plugin causing “too many redirects”
- How to redirect to clean links with this code
- How can I make my WordPress site redirect to subdomain once successfully login they will redirect back to root domain
- Redirections and rewrites to subdomain
- Redirect user to previous page after signup from custom form
- How To Fix 404 errors caused by Google Indexing WordPress In Subdirectory
- Unable to access folders in same level as wordpress installation
- 301 Redirect all page and post urls from .html to /
- Get query parameters from external url and make a redirection
- Why does specifying ‘about-us’ as a link target take longer than specifying ‘about-us/’?
- Internal Links that Automatically Update
- wordpress_redirect returns different headers for HEAD and GET requests
- Usage of the login_redirect filter
- Show different page for first time user
- Redirecting to new URL structure and 301
- Blog has an infinite redirect loop
- WP forwarding to wrong site address
- wp_login_form redirect problem
- How can I redirect users on the new 404 page without plugin?
- How do I write a subdomain redirect?
- How does WordPress format the url on a 301 when a trailing slash is missing?
- Redirection on domain name
- Redirect only Blog posts to new
- htaccess redirect from specific urls of my site to the homepage
- Can’t make redirect in WordPress
- Upload Directory question
- 301 Redirect /author/username/ to /profile/username/
- Redirection with a wildcard
- How can I stop redirecting from a search to a taxonomy archive page
- How to return a 410 code for previously published posts now set to draft?
- Debugging issue with redirection in WordPress
- The / location 301-redirects to itself in a loop
- Redirect user from backend to frontend
- Better, more efficient redirecting
- Internal Redirections?
- Need to redirect from Apache2 Ubuntu Default Page to home page in wordpress
- Make a treatment before the action of the form
- Make custom post type archive for administrator only
- Using cache brokes redirecting
- Is it possible to take a new visitor to the site to a disclaimer page and then return them to their previous page?
- How to 301 redirect sub domain post URL to root domain
- Homepage (domain) that redirects user toward two subdomains based on his/her preferred language
- redirect to another page if user has registered successfully
- Too many redirects error when change of base url
- How to redirect new registrars to a custom registration page instead of WP default registration page?
- WordPress redirect users from certain countries to subpage of language version
- When redirecting all URLs to homepage, what exceptions do I need to make?
- Unable to access WP test site
- Force SSL on a single page which is used as iFrame
- Redirect from subdomain
- Show page without reference to post (like front-page)
- How to redirect all pages of a blog to a new blog
- Remove link before another link
- How to handle expired assets/content when user has direct URL
- Best SEO way to redirect from all “posts” to home url
- How to redirect users without permission to view content to a custom page?
- redirect the root of a domain, while leaving the www version unredirected
- How to Create Custom Route to a page in WordPress
- How to create a redirect to another domain like safe redirect manager from php
- Post Migration Site Migration Redirects All Known Solutions Attempted