 <p>I would do something like this. I'm thinking the problem could be the order of the rules, that say, the first rule will try to load the image/js/css since isn't looking if the file exists.</p> <p>try this:</p> <pre><code>Options -Indexes RewriteEngine on Options +FollowSymLinks RewriteCond %{HTTP_HOST} !^www\.website\.com$ [NC] RewriteRule .* https://www.website.com/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ myfolder/index.php?q=$1 [L,QSA] RewriteRule ^$ myfolder/index.php [L] </code></pre>