Author

Siddharth Shukla

Browsing

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} =http RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] RewriteRule ^wp-admin/includes/ – [F,L] RewriteRule !^wp-includes/ – [S=3] RewriteRule ^wp-includes/[^/]+\.php$ – [F,L] RewriteRule ^wp-includes/js/tinymce/langs/.+\.php – [F,L] RewriteRule ^wp-includes/theme-compat/ – [F,L] RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Options All -Indexes If you don’t want to change anything on .htaccess you may try this out add_action(‘template_redirect’, ‘redirect_core’, 50); add_action(‘init’, ‘redirect_core’, 50);…

sudo chown -R www-data /var/www/html open your .htaccess folder and put this line inside of .htaccess files Options All -Indexes Your .htaccess file now looks like # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^wp-admin/includes/ – [F,L] RewriteRule !^wp-includes/ – [S=3] RewriteRule ^wp-includes/[^/]+\.php$ – [F,L] RewriteRule ^wp-includes/js/tinymce/langs/.+\.php – [F,L] RewriteRule ^wp-includes/theme-compat/ – [F,L] RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # http to https RewriteCond %{HTTP:X-Forwarded-Proto}…

sudo chown -R www-data /var/www/html chown www-data:www-data -R * find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; Giving the full access to all wp files to www-data user (which is in this case the web server user) can be dangerous. So rather do NOT do this: chown www-data:www-data -R * It can be useful however in the moment when you’re installing or upgrading WordPress and…

What is Cloudflare Firewall Rules? Cloudflare Firewall Rules is another firewall tools offered by Cloudflare which announced in October 2018. It is a powerful and flexible security tool to filter web application traffic. Read More: https://blog.runcloud.io/cloudflare-firewall-rules/ https://turbofuture.com/internet/Cloudflare-Firewall-Rules-for-Securing-WordPress https://10alert.com/how-to-use-cloudflare-to-secure-your-wordpress-site/