Sooo the problem was my brackets around the content in the condition I think.
I’m still not so hot on these things, but I use these rules and they work:
RewriteCond %{REQUEST_URI} ^/(review|preview|feature).*\-[0-9]+$
RewriteRule ^review/(.*)\-[0-9]+$ /$1 [R=301,L]
RewriteRule ^preview/(.*)\-[0-9]+$ /$1 [R=301,L]
RewriteRule ^feature/(.*)\-[0-9]+$ /$1 [R=301,L]
note: the (review|preview|feature) but is an x OR y OR z, as I have the rule working for any of those folders specifically.
Related Posts:
- Redirect URL Containing åäö
- htaccess – Redirect to subfolder without changing browser URL
- Generic htaccess redirect www to non-www
- Making a plugin file accessible via url rewrite?
- How to change default page slug?
- Sub domain redirection to taxonomy
- Custom domain for sub-section of parent website
- Menu links only using http after enabling https, unable to redirect http links
- How to create a 301 redirect that doesn’t apply to subsites
- Why does multisite bypass WordPress for wp-content, wp-admin, wp-includes and .php files?
- mod_rewrite empties QUERY_STRING if starting with number [closed]
- .htaccess rule to redirect old URLs to new structure [closed]
- How to configure Multisite Network with randomized hostnames?
- How to remove wordpress directory slash
- Wrong Redirect/Rewrite Rules?
- Redirections and rewrites to subdomain
- How To Fix A Redirect Chain
- Image URLs not redirecting properly
- How to remove the [L] Flag for WordPress index .php mod_rewrite
- Changing wp login url without plugin
- WordPress .htaccess rewrite for custom template
- Why does WordPress redirect when I separate wp-core and wp-content?
- Some posts from custom post type to subdomains
- mod_rewriting conflict with WP permalinks in htaccess [closed]
- Redirect – remove custom query string
- WordPress and Htaccess
- What is the importance of mod_rewrite?
- 1 WordPress, 2 themes, 2 domains, 2 servers
- apache_mod_loaded setting can fubar plugins?
- Understanding Redirects
- How to stop rewrite from redirecting
- Block bad bots with mod_rewrite and save in blacklist
- Cannot get 301 redirection in htaccess to work (either Redirect or Rewrite)
- What is the best practice workflow for new website overhaul and keeping current SEO ranking? [closed]
- htaccess and redirect to new url using regex
- WordPress on a subfolder but accessible from root
- URL Redirect on GoDaddy platform [closed]
- Redirect, Change URLs or Redirect HTTP to HTTPS in Apache – Everything You Ever Wanted to Know About mod_rewrite Rules but Were Afraid to Ask
- How do I make a redirect in PHP?
- php refresh current page?
- Host the wp-admin on another domain?
- How to remove dates from existing permalinks?
- My permalinks are broken! Can I use mod_rewrite to ignore a physical file?
- WordPress HTTPS redirect loop
- PHP – redirect https to http and www to non-www
- mod_rewrite enabled but Permalinks show index.php
- Masking logout URL
- How can I move/redirect single blog posts from one blog to another?
- How do I redirect all 404 errors of a specific post type to another URL?
- Redirecting user after updating profile?
- Sub-subdomain getting redirected to main domain
- Can’t access my WP dashboard: fatal error? [closed]
- Redirect before post page
- How to redirect to action on custom page within admin section
- Moving variables from one page to another
- https redirect (with .htaccess) redirect loop
- Posts are being redirected to xampp home page
- Using custom mod_rewrite without breaking wordpress permalinks
- How to publish new posts/pages in root instead of subfolder, but keep old structure in place?
- forward domain name to particular page?
- Contact Form 7 Data to Whatsapp Link
- Search result page redirect ex.com/?s=searchterms to ex.com/searchterms
- Redirect to specified page when insufficient permissions?
- Page Restriction and Redirect for Particular Levels or user
- ReWriteRules and WordPress Multi-Sites with Sub Directories
- Why do my categories redirect?
- I need to redirect an entire subdirectory in WordPress to the homepage – is this correct?
- I get redirected too many times only in wp-admin?
- Read GET parameters in APACHE Mod Rewrite rules for WordPress categories in Posts
- How to create a redirect in the .htaccess file, with 2 exceptions
- How to – proper WordPress 301 redirects?
- WordPress: how to change URL for individual MultiSites?
- Login form from shortcode doesn’t redirect after successful login
- Redirect when click on “response” in comment section
- Passing the JQuery string to Worldpress URL
- Changing URL scheme, mod_rewrite not helping
- permalink results to “page not found”
- Is WordPress API visible from PHP file called in htaccess
- .htaccess rewriterule being ignored – tyring to remove dates from WP posts
- How to temporarily redirect front page of a network to one of the sites/blogs?
- Redirect old URL (with different post ID) to new URL
- How to redirect an old page url to the homepage
- Delete Redirect Slug For Specific Post
- Duplicated WP site manually, now links redirect wrong [closed]
- PHP Redirect condition
- 404 redirect based on url
- All URLs Redirect to Main Page
- Subdomain redirect problem
- how can i redirect dynamic URL in worpress base on ID in htaccess or wp-config or function.php
- How to change Route respond To A specific Path?
- After switch domain, some parts of my site still point to my old domain
- How to redirect user to the specific URL and display notice
- WordPress not loggin user and redirecting after custom registration
- Redirect after empty register form
- Only homepage working correctly, 404 error on everything else
- Can’t get pretty permalinks to work without index.php
- 301 Redirecting posts without %postid% (just %post_name%) in permalink to ones with %post_name%_%postid%
- Subdomain add comment redirect to 404 not found page iis server
- WordPress not remembering old slugs for pages
- Category Redirection Problem