Virtual Host Bits

# For localhost on XAMPP, MAMP, and others
# file: httpd-vhosts.conf
# restart apache after making changes

#-------------------------------------------------------    DOMAIN
<VirtualHost *:80>
    ServerName DOMAIN.dev
    ServerAlias www.DOMAIN.dev
    DocumentRoot "/path/to/document/root/DOMAIN/"
    <Directory "/path/to/document/root/DOMAIN/">
        AllowOverride All
        Order Allow,Deny
        Allow from all
        Require all granted
    </Directory>
</VirtualHost>
<VirtualHost *:443>
    ServerName DOMAIN.dev
    ServerAlias www.DOMAIN.dev
    DocumentRoot "/path/to/document/root/DOMAIN/"
    <Directory "/path/to/document/root/DOMAIN/">
        AllowOverride All
        Order Allow,Deny
        Allow from all
        Require all granted
    </Directory>
    SSLEngine on
    SSLCertificateFile "/path/to/ssl/crt/DOMAIN.crt"
    SSLCertificateKeyFile "/path/to/ssl/key/DOMAIN.key"
</VirtualHost>

Example: Apache

# rewrite`s rules for wordpress pretty url
LoadModule rewrite_module  modules/mod_rewrite.so
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [NC,L]

ExpiresActive On
ExpiresByType application/x-javascript  "access plus 1 days"

Order Deny,Allow
Allow from All

<Location /maps/>
	RewriteMap map txt:map.txt
	RewriteMap lower int:tolower
	RewriteCond %{REQUEST_URI} ^/([^/.]+)\.html$ [NC]
	RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND
	RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L]
</Location>

Example: .htaccess

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress