<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

#remove wp-admin from internet
#RewriteCond %{HTTP_HOST} !adm.*$ [NC]
#RewriteRule ^(/)?access/?$ /404 [L,R=301]
#RewriteCond %{HTTP_HOST} !adm.*$ [NC]
#RewriteRule ^wp-login.php$ /404 [L,R=301]



# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

#Enable/Disable CMS
RewriteCond %{HTTP_HOST} !adm.*$ [NC]
RewriteRule ^(/)?access/?$ /404 [L,R=301]
RewriteCond %{HTTP_HOST} !adm.*$ [NC]
RewriteRule ^wp-login.php$ /404 [L,R=301]

php_value upload_max_filesize 60M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300

</IfModule>

# Start 310 Redirects
Redirect 301 /sanlam-umbrella-fund/ https://seb-news.sanlam.co.za/umbrella-fund/
Redirect 301 /sanlam-consultant-toolkit/ https://seb-news.sanlam.co.za/consultant-toolkit/
Redirect 301 /unity-umbrella-fund https://seb-news.sanlam.co.za/unity/
# END 301 Redirects

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType application/pdf "access 1 month"
ExpiresByType application/x-javascript "access 1 month"
ExpiresByType application/x-shockwave-flash "access 1 month"
ExpiresByType image/x-icon "access 1 year"
ExpiresDefault "access 2 days"
</IfModule>
## EXPIRES CACHING ##

<FilesMatch "\.(htm|html|php)$">
    <IfModule mod_headers.c>
        Header set X-UA-Compatible "IE=Edge,chrome=1"
    </IfModule>
</FilesMatch>