Hello, I am trying to do a simple 301 .htaccess redirect for a webpage that had a one deep category: ======================== Example: Redirect 301 /category/page-name/ http://www.xyzwebsite.com/page-name.html ======================== However, I keep getting a page not found error??? I have done many 301 redirects before, but this is the first time a category was involved. Is there a trick to 301 .htaccess redirects when a category is involved? Thanks...
RewriteRule ^category/(.*)$ /$1 [R=301] #catches the first instant RewriteRule ^category/(.*)/(.*)$ /$2 [R=301] #catches the second RewriteRule ^category/(.*)/(.*)/(.*)$ /$3 [R=301] #catches the third and so on... RewriteRule ^category/(.*)/(.*)/(.*)$ /$2/$3 [R=301] #you can also do combinations