

- #Litespeed web server .htaccess rewrite directories how to
- #Litespeed web server .htaccess rewrite directories code
- #Litespeed web server .htaccess rewrite directories download
> I have searched which server is good for security. Mitchellkrogza has other security-related stuff too…phishing, malware sites, etc. However, given your troubles, it seems like that is something you would want to do… htaccess for all sites (if in global apache2(8) conf file) or a particular site (if in /etc/apache2/sites-available/nf). Will generate a 404 for every attempt to access a file/directory beginning with dot e.g., htaccess into /etc/apache2/sites-available/nf and then enable the site with sudo a2ensite mysiteĪnd disable it with sudo a2dissite mysiteĮnabling mod_rewrite and adding this to your main apache2(8) conf file (or any of your site configuration files in /etc/apache2/sites-available) RewriteEngine on htaccessīut then I never use it…for exactly the reasons you cite. That is exactly the setup I have… In my main apache2(8) conf file, I have: AccessFileName. htaccess if you declare it as your AccessFileName.

If you use apache2(8), you are not required to use. From the description of your troubles, it sounds like you expect server security to happen by magic. Implementing good security requires effort on your part to make your server secure. NO server is going to have good security if you don't use the security facilities the server offers you.
#Litespeed web server .htaccess rewrite directories how to
Check out our WP Tips and How To categories for more posts like this.I have searched which server is good for security. I hope you find this configuration useful on your projects. Those resources are images which rarely change after uploading, and css and js files, which are generally static.Īnd finally, it removes WordPress’ handling of static resources, so your static files won’t use any PHP resources on your server. It also prevents website to be displayed in an iframe.įor the performance side, it forces user’s browser to cache static resources a long time. This file improves security by adding X-XSS-Protection header, and removing PHP version from the request. RewriteCond % \.(css|htc|less|js|js2|js3|js4|html|htm|rtf|rtx|svg|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|webp|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|_otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|_ttf|wav|wma|wri|woff|woff2|xla|xls|xlsx|xlt|xlw|zip)$ # Serve Static Files Directly w/o using WordPress Header set Cache-Control "max-age=2592000, public" # 30 Days Browser Cache for CSS and Javascript files Header set Cache-Control "max-age=31557600, public" # Maximum Browser Cache for Static Resources Header set X-Content-Type-Options nosniff Header always append X-Frame-Options SAMEORIGIN Header set X-XSS-Protection "1 mode=block"

#Litespeed web server .htaccess rewrite directories code
#Litespeed web server .htaccess rewrite directories download
Download htaccess and make sure you make a backup copy before changing the server version.

That file is a hidden file by default, you need to switch show hidden files option on your FTP application if it is not visible. htaccess file in the root of your WordPress installation directory.
