Forum Moderators: phranque
I want to redirect mysite/dir1 to a another relevant directory. Lets call this mysite/dir2
How do I do this using .htaccess
RewriteEngine On RewriteRule ^dir1(/.*)?$ http://www.example.com/dir2$1 [R=301,NC,L]
should do it, assuming that by 'mysite' you meant www.mysite.com
Works fine.
pls explan the syntax,I hv the same problem. ^dir1(/.*)?$ http://www.example.com/dir2$1 [R=301,NC,L]
Thanks, d
The documents cited in our forum charter [webmasterworld.com] should help you get started. Also see the Apache Forum section of the WebmasterWorld library [webmasterworld.com].
Jim