I am sure this might have been asked before but I’ve been pulling my hairs for two days with no luck, what I want to do is do a 301 redirect for http://www.domain1.com/mydesk/anything to http://www.domain2.com/blogs. So far what I’ve been able to do is get the /mydesk requests to go to /blogs on domain2 but when ever something is requested like /mydesk/test1/test it goes through so what I would want is know how to remove the appending URL so anything for /mydesk/anything goes to domain2.com/blogs whatsoever.
so http://www.domain1.com/mydesk/whatever 301 http://www.domain2.com/blogs without the appending URL from the requested link.
Thanks.
If you want everything in the “mydesk” folder to redirect to the same blogs folder on the new domain, you can use this:
If you want to append whatever is after “mydesk” to the new URL (e.g. /mydesk/some-specific-blog -> example.com/blogs/some-specific-blog), you can just append a
$1to the end of the line, like so: