How will you secure your wordpress by using .htaccess file?

In wordpress you have a wp-config.php file.It has all the details related to wordpress installation like database user and password. And to secure the installation you add the following code in .htaccess file present in root of your wordpress installation:-

<files wp-config.php>
order allow,deny
deny from all
</files>

WordPress blogs are injected by the hackers. We can protect the wordpress blog from such injection by using following code in wordpress :

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]

  • 1 Користувачі, які знайшли це корисним
Ця відповідь Вам допомогла?

Схожі статті

Can I use my domain name or must I use my IP address as the hostname for FTP?

Using your IP address (192.168.22.22  is an example IP address) is the preferred entry for...

Can you transfer my sites from my current host to my new VPS?

Yes. We will transfer all of your sites free* of charge and will assure that you experience no or...

Do you allow MP3 files? Do you allow streaming of videos?

Yes we do with our special plans at http://hostripples.in/avs-hosting.php

Do you support Cold Fusion?

We do not support or Cold Fusion on our shared hosting servers, however you are more than welcome...