Your external redirect needs to go at the very top of your .htaccess
file, before the WordPress front-controller (ie. before the # BEGIN WordPress
section).
If you place it at the end of the file then it will simply never get processed, because the WordPress front-controller routes all URLs and then stops further processing.
If you place it inside the # BEGIN WordPress
block then WordPress is likely to (try to) overwrite this in a future update.
Aside: You don’t need the <IfModule mod_rewrite.c>
wrapper. You already know that mod_rewrite is enabled on your server (or not) and presumably this redirect is mandatory?
Related Posts:
- Stop WordPress and Plugins from Overwriting .htaccess
- Which is better: 301 Redirect in my .htaccess file or a plugin like Redirection?
- Redirect an old link to new site homepage [closed]
- How do I setup htaccess for 301 redirects, post Joomla to WordPress migration? [closed]
- WordPress permalink, stop redirection
- Redirect wrong links WordPress
- What’s the best way to manage a lot of 301 redirects in WordPress?
- different CNAME to corresponding subfolders
- Redirect from domain.com to subdomain.domain.com
- Redirect old php link to wordpress link in .htaccess
- WordPress Redirect All HTTP requests to HTTPS via .htaccess
- PHP – redirect https to http and www to non-www
- 301 redirect not working through .htaccess
- multisite htaccess 301 redirects
- 302 redirect instead of 301 after switch to HTTPS
- W3 Total Cache Plugin with WP 3 MultiUser [closed]
- Pages 404 in wordpress
- Using “wordpress_logged_in” to restrict direct access to uploads folder in 2021
- Temporary .htaccess blocking is disabling WP Crons from running?
- Can WordPress redirect to a “similar page” in case of 404 error
- .htaccess redirects disappeared after re-saving permalinks
- Hacked website redirect, only on desktop, help with restoring it [closed]
- Sub-subdomain getting redirected to main domain
- WordPress multilingual website domain and folders
- Attach to wp-login.php and xmlrpc.php
- How to create a 301 redirect that doesn’t apply to subsites
- WordPress blocking/preventing viewing of .cgi file in subdirectory [closed]
- https redirect (with .htaccess) redirect loop
- XMLRPC filtering through htaccess not working
- Corrupt .htaccess file
- Cache policy not updated according to PageSpeed
- Redirect blog archive into certain format
- How to publish new posts/pages in root instead of subfolder, but keep old structure in place?
- forward domain name to particular page?
- What’s the opposite of required valid user in .htaccess authentication
- How can i redirect one url to another url using .htaccess or add_rewrite_rule
- redirect the homepage using .htaccess outside of WordPress
- Https Redirect infinite loop in Mobile browsers
- htaccess 301 Redirect not working for WordPress site
- 403 error on admin login page
- Redirect only posts to New Domain
- I need to redirect an entire subdirectory in WordPress to the homepage – is this correct?
- .htaccess rewriting old RSS feed URL to WordPress feed URL
- How can I set Cache TTL for woff and woff2 font files with htaccess?
- How can I fix the redirect chain after implementing ssl on wordpress?
- How do I configure wordpress structure for development using git and composer
- Multisite Redirection to new domains
- Custom rewrite rule, url returning 404
- 301 (static page instead latest posts)
- mod_rewrite doesn’t work as I want even with JSON API Plugin disabled
- Htaccess https 301 problem
- WordPress .htaccess file gives issues with subdirectory
- W3 Total Cache CSS & JS files GZip issues [closed]
- WP Super Cache unable to locate cache file for only the homepage
- Cannot login to WordPress site after changing .htaccess for security purposes
- add_rewrite_rule to remove /category/ from permalink
- Rewrite vs Redirect from ?p={ID}
- Force redirect single.php to index
- How to forward all requests starting with a specific folder name to the same folder
- I used single quote to design HTML of my WordPress blog. Now site redirects to index.php everytime than page.php or single.php
- Issue redirecting ‘blog’ to ‘news’ in WordPress using .htaccess
- .htaccess Non-‘www’ to ‘www’ Subdomain Redirection Only Works for Homepage
- Some Pemalink problems, probably caused by wrong .htaccess configuration?
- Use two different index pages
- Moving wordpress to different url/server creates redirect loop
- Htaccess rewrite based on query string, not working [closed]
- Redirect all subdomains to root domain
- Redirect old query string URLs to new add_rewrite_rule URL
- 301 Rewriting htaccess
- Is there way to redirect all blog post pages to Home page?
- Temporary Infinite Redirect Loop
- How to execute WordPress as though it is in the root folder while it is installed in a subdirectory?
- A question about .htaccess
- Htaccess maintenance page rules that actually work with WordPress?
- How to allow only vpn access to dashboard on Bitnami WordPress by IP address restricting
- ErrorDocument 410 gives me back a 302 header
- Blocking wp-login in HTACCESS has also blocked password protected pages
- How to create multiple Rewrite-Rule for various site in single htaccess?
- htaccess redirect to path
- Non-wordpress subdomain on Multisite Installation
- Unable leverage Browser Caching on AWS Bitnami stack (Apache) through W3TC and Cloudfront CDN
- WordPress Redirect / Add_Rewrite_Rule – Non Index.php Page
- How do I skip wordpress’s 404 handling?
- Redirect to homepage if attmpting to leave intranet [closed]
- Rewrite rules and maintain URL
- Subfolder renaming
- redirect 301 with special character like WIX site “#!”
- Targeting .htaccess file with file_put_contents
- Redirect Loop in Regex Moving to HTTPS
- .htaccess file changes disappear
- Debugging a redirect loop affecting only certain pages
- WordPress login bug. Need an emergency solution
- .htaccess and virtual host configuration for WP in its own directory
- 403 forbidden due to .htaccess?
- redirect old pages by .htaccess
- WordPress redirect from one directory to another but exclude wp-admin and wp-login.php
- Where is the htaccess in wordpress.com hosting?
- Debug errors for “Destination directory for file streaming does not exist or is not writable”
- How to use multiple 404 Error Pages in WordPress
- How To Add CSP frame ancestors in WordPress Website? [closed]