for a site move I need to hardcode some very simple URL Rewrites. I only see examples with regular expressions but what I need is this:
I have a CSV like
new URL, old URL
http://shop.example.com/categoryB, http://example.com/shop/categoryC
as you see, as the category names are not the same, there is no Regex magic necessary, I just want to create a .htaccess file with one URL Rewrite per line, that’s it.
I tried
RewriteRule http://shop.example.com/categoryB http://example.com/shop/categoryC [L,R=301]
but this doesn’t seem to work,
thanks for the help!
Ok, the answer looks like this:
RedirectMatch 301 /categoryOLDSITE http://example.com/shop/categoryNEWSITE
important is the slash in front of the old site and that it isn’t a complete URL but a relative one to the location of the .htaccess file.
further information here: http://httpd.apache.org/docs/2.0/mod/mod_alias.html