it is probably a stupid question, but I have real troubles figuring out, how to redirect/products to /products/itemIt is a simple redirect, no regex needed. The toplevel site /products should just always redirect to /products/itemI tried:<IfModule mod_rewrite.c>RedirectMatch 301 /products(.*) /products/item/$1</IfModule>I receive the error, that the webserver is redirecting in an infinite loop. That might be because of the rest of the htaccess file. Which looks like that:# Custom Rules<IfModule mod_rewrite.c>RedirectMatch 301 /products(.*) /products/item/$1</IfModule># BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteRule ^index\.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]</IfModule># END WordPressBut the strangest thing: When I load the page, I get the error. When I then hit reload, it works???Thanks for your help!ole
htaccess 301 redirect subdirectory one level deeper - why is this not working?
htaccess;wordpress;301 redirect
If you just want to redirect /products to /products/item, this should work:RedirectMatch 301 ^/products/?$ /products/itemThe ^ and $ characters anchor the regular expression to the beginning and end of the path, so that it won't match /foo/products or /products/bar.  The /? allows it to match both /products and /products/; you can remove it if you don't want that.