Forum Moderators: phranque
I need every page from one directory /handbags/
to go to the root directory /
if a page is a php then it will go to the same php only in the root directory
same with .html all files should go to the index so if the file is
mysite.com/handbags/designerbag-21-p.html I would like it to be redirected to
mysite.com/designerbag-21-p.html
can this be done and if so what code should I use in my .htaccess
any help is appreciated
RedirectMatch 301 ^/handbags/([^.]+)\.(php¦html)$ http://www.example.com/$1.$2
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim