A typical redirect is usually done for either:
- The entire website to another website:
Redirect / https://www.example.com/
- Or from one specific path of a website to another location:
Redirect /path http://www.example.com/some-other/path
The limitation of Apache’s Redirect directive is that you cannot partially (nor selectively) redirect only the root URL “/”, without also redirecting everything after it to another path or location (e.g., redirect “/” will also match and redirect on request for “/folder/”)…
This is because
Redirect matches everything after the given path, and a redirect from “/” is a redirection of all the website’s URLs.
Use RedirectMatch to only redirect the root URL “/” to another sub-directory or URL, without also redirecting everything else…
RedirectMatch ^/$ http://www.example.com/another/path
RedirectMatch uses a regex match, it can be specific with the “/” path without matching everything else.