redirect root to subdirectory - best practice
i want to redirect my root domain XXX.com to XXX.com/YYY.
i want let users to access all other pages like XXX.com/ZZZ and not redirected.
i tried both .htaccess and apache conf but didnt manage to make it work.
- what is the best solution?
- how do i do that?
It looks like what you want to do is create a redirect in Apache. We have a guide on doing this on our website:
Essentially, in the Apache configuration, specifically the vhost file, you'll redirect users from one site to another. Should you be concerned about SEO, then you'll want to consider the type of redirect you're making. If this is a permanent move, then you'll want to do a 301 redirect. If this is just a temporary change, you'll want a 302.