Your IP : 216.73.217.79


Current Path : /var/www/cesa.co.za/
Upload File :
Current File : /var/www/cesa.co.za/.htaccess

#php_flag log_errors on
# php_value error_log /usr/home/saacea/PHP_errors.log

#php_value upload_max_filesize 64M
#php_value post_max_size 64M

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base|env|bak|old|orig|save|swp|dist|log)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format|\.env(\..*)?|debug\.log)$">
  Require all denied
</FilesMatch>

# Explicitly allow access to admin-ajax.php
<Files "wp-admin/admin-ajax.php">
    Require all granted
    Allow from all
</Files>

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

RewriteCond %{REQUEST_URI} ^/php/mail_interface/index\.php$ [NC]
RewriteRule ^ - [L]
SetEnvIf Request_URI "^/php/mail_interface/index\.php$" allow_mailinterface

# Block specific bots by User-Agent
BrowserMatchNoCase "DotBot" badspambot
BrowserMatchNoCase "dotbot" badspambot
BrowserMatchNoCase "wordpress" badspambot
BrowserMatchNoCase "nbot" badspambot
BrowserMatchNoCase "Barkrowler" badspambot
BrowserMatchNoCase "BLEXBot" badspambot
Deny from env=badspambot !allow_mailinterface

# Additional protection using SetEnvIfNoCase
SetEnvIfNoCase User-Agent "MJ12bot" badspambot
SetEnvIfNoCase User-Agent "AhrefsBot" badspambot
SetEnvIfNoCase User-Agent "SemrushBot" badspambot
Deny from env=badspambot !allow_mailinterface

# Block empty User-Agents (common with malicious bots)
SetEnvIfNoCase User-Agent "^$" badspambot
Deny from env=badspambot !allow_mailinterface

# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /

# SetEnvIfNoCase User-Agent "DotBot" bad_user

RewriteCond %{HTTP_USER_AGENT} DotBot
RewriteCond %{REQUEST_URI} !robots.txt
RewriteRule .* – [F,L]

#RewriteCond %{HTTP_HOST} ^cesa\.co\.za [NC]
#RewriteRule ^(.*)$ https://www.cesa.co.za/$1 [R,L]

#RewriteCond %{HTTP_HOST} ^www\.cesa\.co\.za [NC]
#RewriteCond %{SERVER_PORT} 80
#RewriteRule ^(.*)$ https://www.cesa.co.za/$1 [R,L]

RewriteRule ^index\.php$ - [L]

# 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]

</IfModule>

# END WordPress

AddType application/msword .doc
AddType application/msword .dot
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document .docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template .dotx
AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.ms-word.template.macroEnabled.12 .dotm
AddType application/vnd.ms-excel .xls
AddType application/vnd.ms-excel .xlt
AddType application/vnd.ms-excel .xla
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet .xlsx
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template .xltx
AddType application/vnd.ms-excel.sheet.macroEnabled.12 .xlsm
AddType application/vnd.ms-excel.template.macroEnabled.12 .xltm
AddType application/vnd.ms-excel.addin.macroEnabled.12 .xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 .xlsb
AddType application/vnd.ms-powerpoint .ppt
AddType application/vnd.ms-powerpoint .pot
AddType application/vnd.ms-powerpoint .pps
AddType application/vnd.ms-powerpoint .ppa
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation .pptx
AddType application/vnd.openxmlformats-officedocument.presentationml.template .potx
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow .ppsx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 .ppam
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 .pptm
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 .potm
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 .ppsm
AddType application/vnd.ms-access .mdb