swa66 - 3:06 pm on Sep 14, 2012 (gmt 0)
RewriteRule ^oldpage1$ http://www.example.com/test/newpage1? [R=301,L]
can also -easier IMHO- be written as:
RedirectPermanent /oldpage1.html http://www.example.com/test/newpage1
RedirectPermanent /oldpage1.html http://www.example.com/test/newdir1/
RedirectPermanent /olddir1/ http://www.example.com/test/newdir1/
I guess I started using this long before apache had rewriterules :-)
Considering the capabilities for complex things rewriterules can handle, I'd still prefer the old Redirect (302) or RedirectPermanent (301) just for efficiency till I'd seen performance figures indicating otherwise.