I want to redirect everything from a certain subdirectory to the root of another site, i.e. without the subdirectories:
example.com/jobsshould be redirected to
- everything path behind
/jobsshould be omitted
example.com/jobs/fooshould also be redirected to
This last part is the most difficult as with
Redirect 301 /jobs jobs.example.net the path
/foo is not omitted. Thus,
example.com/jobs/foo is redirected to
jobs.example.net/foo which throws a
404 Not Found error, as this page doesn't exist.
How can I achieve that the path is omitted in a redirect?