• So here is what I think should be a common problem but apparently is not. I have wordpress installed in its own directory. After some time I decided that instead of https://www.example.com/wordpress; it makes better SEO sense to have https://www.example.com

    I followed the steps of the codex and everything works fine. However I have a lot of repeat visitors who have bookmarked https://www.example.com/wordpress

    How do I automatically redirect them to the root? i.e. https://www.example.com

    Mind you, since I have used the codex there are 2 index.php files and 2 .htaccess files (one set each in the root and wordpress folders).

    The only thing that worked was this –

    Redirect permanent /wordpress https://www.example.com/
    Redirect 301 /wordpress/ https://www.example.com/

    When I added this code to the .htaccess file in the /wordpress folder ; visitors get redirected fine. However images are broken and so is the theme since all that data is stored inside the wp-content folder inside the /wordpress/ (which is also getting redirected I think).

    How do I redirect only the visitors? Please help.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redirecting visitors to root’ is closed to new replies.