301/302 redirect from slash root to specific home page url
.htaccess, apache, mod-rewrite, regex, url-rewriting
Solution
Use this line:
RedirectMatch 302 ^/$ /home/
To make sure only root is redirected to `/home/`
Problem
I have been asked by my client's SEO agency to perform a 302 redirect on the home page of their website to the more specific URL of the same page i.e. (not the slash root version). This is a WordPress site running on Apache2 with .htaccess file in place. I need to achieve the following: Redirect from: ``` http://www.example.com/ ``` 302 redirect to: ``` http://www.example.com/home/ ``` I thought I could do this: ``` redirect 302 / http://www.example.com/home/ ``` But of course this redirects everything to that url. So I guess I need some sort of regular expression but not sure how to produce the desired effect? Could anyone point me in the right direction? Any feedback greatly appreciated. ;)