Reputation: 35
I am thinking of adding the .htaccess file in my website which is a wordpress website, according to my research it can optimize the speed of the website by disabling the hotlinking and other stuff.
I want to add it but I am not so sure because I know it from other websites I worked with it can come with errors and I don't understand how wordpress communicate with .htaccess file.
this is the code that i want to add.
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?sparringmind.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?feeds2.feedburner.com/sparringmind [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]
Wordpress can be trick after adding this file it can trigger more errors and cause me a headache.. I want to know if with this code alone is it safe for me to just add that file on my root file and hope it will just do the job or there are some more configurations I need to run?
Thanks
Upvotes: 1
Views: 118
Reputation: 76
try the following steps
Troubleshooting
Upvotes: 1