Forum Moderators: phranque
I need to know a rewrite rule
I want to redirect all pages from a directory to a new url (the same for all redirected pages)
First I thought:
Redirect 301 /dir [newurl.com...]
but the problem withs this it is that it maintains the path, I dont want this
I want that
dir/a.htm, dir/b.htm , dir/c.htm.....all of them redirect to the same new url
Any help welcome
Try using RedirectMatch [httpd.apache.org] instead.
RedirectMatch 301 ^/dir http://www.newurl.com/
I see no difference between redirect and redirectmatch
when i use
RedirectMatch 301 ^/dir [newurl.com...]
and somebody is typing dir /whatever.html it redirects to www.newurl.com/whatever.html instead of just www.newurl.com