Skip to content

Instantly share code, notes, and snippets.

@k1sul1
Created September 19, 2016 09:46
Show Gist options
  • Save k1sul1/f34a8bb087e7a00b631700d2a92f5fb2 to your computer and use it in GitHub Desktop.
Save k1sul1/f34a8bb087e7a00b631700d2a92f5fb2 to your computer and use it in GitHub Desktop.
Serve Vue.js (vue-loader) project inside a WordPress installation as a subdirectory
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^static/(.*)$ /subfolder/static/$1 [R=301,NC,L] # magic line, rewrite requests to domain.com/static to domain.com/subfolder/static. Quite useful on locked webhosts.
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment