Skip to content

Instantly share code, notes, and snippets.

@jmslbam
Created November 4, 2012 14:59
Show Gist options
  • Save jmslbam/4012197 to your computer and use it in GitHub Desktop.
Save jmslbam/4012197 to your computer and use it in GitHub Desktop.
WP vhost conf
<VirtualHost *:80>
ServerName local.%PROJECT%
ServerAlias local.%PROJECT%
DocumentRoot %DOCROOT%
<Directory "%DOCROOT%/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^assets/css/(.*) /wp-content/themes/%PROJECT%/assets/css/$1 [QSA,L]
RewriteRule ^assets/js/(.*) /wp-content/themes/%PROJECT%/assets/js/$1 [QSA,L]
RewriteRule ^assets/img/(.*) /wp-content/themes/%PROJECT%/assets/img/$1 [QSA,L]
RewriteRule ^plugins/(.*) /wp-content/plugins/$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
</Directory>
</VirtualHost>
<IfModule mod_headers.c>
Header set X-UA-Compatible "IE=Edge,chrome=1"
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment