I want to redirect all traffic from the root of my website to a subfolder on the same domain using .htaccess
Can someone help me out here?
Place this in your webroot .htaccesss
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteCond %{REQUEST_URI} !^/subfolder/
RewriteRule ^(.*)$ /subfolder/$1 [L]
It checks incoming requests, any to that domain get redirected, unless they are already redirected.
Theres an excellent guide here: mod_rewrite, a beginner’s guide (with examples).