Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-stats-manager-pro domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /customers/c/3/6/knuds.net/httpd.www/wp-includes/functions.php on line 6114 HTTAcess filen ~ Knuds Net UseChat

HTTAcess filen

Sikkerhedssniplets til HTTACESS filen for Apache servere.

Lad al trafik på dit website ske gennem https protokollen
 
#Rewrite everything to https
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 

Tillad kun browsere indstillet til dansk brugergrænsefladesprog at besøge hjemmesiden.
 
RewriteEngine On
RewriteCond %{HTTP:Accept-Language} (aa|ab|af|ak|sq|am|ar|an|hy|as|av|ae|ay|az|ba|bm|eu|be|bn|bh|bi|bs|br|bg|my|ca|ch|ce|zh|cu|cv|kw|co|cr|cs|dv|nl|dz|eo|et|ee|fo|fj|fi|fr|fy|ff|ka|de|gd|ga|gl|gv|el|gn|gu|ht|ha|he|hz|hi|ho|hr|hu|ig|is|io|ii|iu|ie|ia|id|ik|it|jv|ja|kn|ks|kr|kk|km|ki|rw|ky|kv|kg|ko|kj|ku|kz|lo|la|lv|li|ln|lt|lb|lu|lg|mk|mh|ml|mi|mr|ms|mg|mt|mn|na|nv|nr|nd|ng|ne|nn|nb|no|ny|oc|oj|or|om|os|pa|fa|pi|pl|pt|ps|qu|rm|ro|rn|ru|sg|sa|si|sk|sl|se|sm|sn|sd|so|st|es|sc|sr|ss|su|sw|sv|ty|ta|tt|te|tg|tl|th|bo|ti|to|tn|ts|tk|tr|tw|ug|uk|ur|uz|ve|vi|vo|cy|wa|wo|xh|yi|yo|za|zu)$ [NC]
RewriteRule .* http://hermanluk.blox.pl/resource/IE7.JPG [R,L]

Undgå visningen af httacess filen

<Files .htaccess>
    order allow,deny
    deny from all

Slå Vanish cach fra

Header add “disablevcache” “true”

Bloker afvikling af eksekverbare filer

|pl|py|jsp|asp|html|htm|shtml|sh|cgi|suspected)$”>deny from all</FilesMatch># Block javascript except for visualcomposer (VC) pluginRewriteEngine OnRewriteCond %{REQUEST_URI} !^.*wp-content/uploads/visualcomposer-assets/.*\.js$RewriteRule ^(.*\.js)$ – [F,L]

Opdater usikrer forespørgsler (script fra Really Simple SSL)

# To remove HSTS. Keep the line, but set max-age to zero. Or “max-age=0”
Header always set Strict-Transport-Security: “max-age=31536000” env=HTTPS

 X-XSS-Beskyttelse (fra Really Simple SSL)

Header always set X-XSS-Protection “1”
Header always set X-Content-Type-Options “nosniff”

Tilføj referrer politik header (fra Really Simple SSL)

Header always set Referrer-Policy “strict-origin-when-cross-origin”

Tilføj X-Frame-Options header (fra Really Simple SSL)

Header always set X-Frame-Options: “SAMEORIGIN”
header End Really Simple SSL

# Tilføj tilladelsespolitikker header (fra Really Simple SSL)

Header always set Permissions-Policy: “Permissions-Policy: camera=(), fullscreen=(), geolocation=(), microphone=(), midi=(), clipboard-read=()”

# Fjern adgang til filer der starter med et punktum (.).

<FilesMatch “^\.”>
Order allow,deny
Deny from all
</FilesMatch>

Tilføj en komentar

Kan du mon huske hvad dine sniplets beyder. En sniplidt er et stykke kode der håndterer en funktion på din hjemmeside. Ovenstående kodeeksempler er fra httacess filen og håndterer forskellige funktioner.

Foran en kode er en havelåge # og derefter kommer koden på linjerne derunder. Når koden er slut, kan du derfor også sætte en afsluttende kommentar. Se eksemplet herunder.

# START kode der tillader kun danske browsere

Her kommer koden så ….

# SLUT koden der tillod kun danske browsere

Scroll to Top