You can use wp_redirect
with something like…
add_action( 'init', 'my_redirect');
function my_redirect() {
if (get_query_var('lang') == "de") {
wp_redirect( site_url('/de/') );
exit;
}
}
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
- Stop WordPress Redirection From /keyword to /some-post-containing-keyword/
- Specific URL has 403 Forbidden status code
- Using redirection plugin to pass URLs as lowercase to wordpress
- Prevent redirect to page/page when reserved term ‘name’ in $_POST when value is a page/post title
- Redirect to login page
- I want to redirect the url to the previous page
- Headers already sent – WordPress core
- Query WP data with the WPDB API from outside WordPress
- Get the final destination after WP_Http redirects (WordPress)
- Why specific file directory fails to redirect but its parent folder succeeds?
- Cant Access Website – Changed HTTP to HTTPs
- How to remove “YEAR/MONTH/” from uploads URL & redirect old URL to the new form?
- How to redirect user to a page after form submission
- How does WordPress redirect without using .htaccess?
- How do I redirect a user when he is logged in after clicking on a menu
- How to redirect from various ?page_id= to home page?
- Code to create a redirection after login?
- Redirect 301 www.my-site.com/page/n to www.my-site.com/ [closed]
- Redirect not logged in users if they are on a specific page
- How can I redirect my website’s homepage to a random blog post?
- htaccess redirects and WordPress
- wp_redirect does not work
- Use virtual pages point to one specific page
- How to migrate production WordPress to Localhost
- Redirect first category archive page to normal page
- How to redirect a page into file?
- Blog index not going to wordpress folder
- Check Page requested, and redirect
- Redirect all requested url to new url
- Can’t control WordPress Addresses from admin panel
- reducing number of URL Redirects and increasing speed
- This redirect loop is eating my lunch! [closed]
- What is this code in my theme’s footer.php causing chmod permission warnings? [closed]
- WooCommerce – Redirect to a product after login
- Problem in disabling canonical 301 redirect
- Prevent users from going to wordpress profile after login
- How to redirect just one or two blog posts correctly?
- Why does the $_GET parameter ?search forward the front-page to the archive/blog page
- Keep subcategory grandson in slug
- Force WordPress https redirect before www redirect based on site address url
- Prevent wordpress autoredirect
- Custom form redirect after login
- How to redirect only 404 pages with htaccess in WordPress
- How to redirect the frontend of a WordPress site (only)?
- My site is being redirected to itself
- Permalinks do not include www subdomain
- Front page is being directed to an unknown site
- Redirect away from page if user is not admin
- Domain redirect to wp-admin/setup-config.php file
- redirect to a child theme based on the town of Internet users in france with the verification of the ip address
- Redirect to parent page if child does not exist
- How do I change the home page to the registered user’s profile page
- Conditional Redirect
- Upload Directory question
- 301 Redirect /author/username/ to /profile/username/
- Redirect Page ID, based on logged-in User Role
- How can I stop redirecting from a search to a taxonomy archive page
- htaccess redirect not working for wp-admin/edit in site using proxy
- How to access my wordpress application using two URLs?
- Redirect Pending Review Status Preview page url to custom url
- Debugging issue with redirection in WordPress
- Redirect user from backend to frontend
- Better, more efficient redirecting
- Internal Redirections?
- WordPress website down with error “redirected you too many times.”
- Make a treatment before the action of the form
- Make custom post type archive for administrator only
- Using cache brokes redirecting
- How to 301 redirect sub domain post URL to root domain
- 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
- Custom Login Plugin Redirects to wp-login.php After Site Migration
- Force SSL on a single page which is used as iFrame
- Redirect from subdomain
- New clone of WordPress site 301 redirects back to orginal site
- 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
- WordPress as a Facebook app
- URL Custom Rewrite
- Forcing header cache control in 404 pages
- Regex for pdf’s – Old .asp Site folder structure to new WordPress Media Folder(s)
- Redirect if a user has not written a post
- Create a custom redirect link that tracks the first visited page and after submitting form goes to first page using formidable forms plugin? [closed]
- WordPress not use site url when redirect 301
- Redirect certain 404 pages to parent page