I have a wordpress website (
www.example.com) where the file are located in a sub folder of the public_html (public_html/x/wp folders).
Since I'm getting some troubles with some plugins and caching programs I would like to move the content to the main folder, therefore, even though it shouldn't change anything on the navigation of the website (because the WordPress installation is set on
www.example.com/x/ and the viewing URL is set to www.example.com) all the media files will need to be redirected to the new location.
I have quite a good SEO on this website and I don't want to lose it.
I know I could simply use this code on my .Htaccess file:
RewriteEngine on RewriteRule ^subfolder/(.*)$ /$1 [R=301,L]
My question is: Will it work as simply as moving the WordPress files to the root, changing the installation settings in the admin area and use this code?
Will I lose SEO on the indexed images on Google ect?
Will it work for every link in the website?