I've moved WordPress into it's own directory as per the instruction found on the WordPress support site.
I've got his working fine but the URL now shows http://www.example.com/subfolder/
but I want it to show without the /subfolder/
I can't seem to get the htaccess to remove the /subfolder/
Here's my current htaccess code
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$
RewriteRule ^(/)?$ subfolder [L]
This should change http://www.mysite.com/subfolder/
to http://www.mysite.com/
RewriteEngine On
RewriteRule ^/subfolder/(.*)$ http://www.mysite.com/$1 [L,R=301]
For future reference: I think the answer provided by Hareesh Sivasubramanian is better:
I advice you against messing up the contents of the .htaccess file. Revert the changes that you've made to this file and follow the simple procedue.
1. Login to the admin dashboard.
2. Go to Settings > General
3. In the WordPress Address (URL) field type http://www.example.com/site
4. In the Site Address (URL) field type http://www.example.com
Save the changes and you should be good to go.
(https://stackoverflow.com/a/37346685/1334353)