.htaccess security help
July 21, 2005 9:13 AM
Subscribe
Web site security question: How can I protect my .htaccess file?
I've been fighting off referrer spammers from my site using
these popular modifications of my .htaccess file. The methods have proven mostly successful, but this morning I awoke to find my site once again bogged down in spam. I took a peek at the .htaccess file and found that my anti-spam modifications had been stripped out of the file. What do I need to do to protect this file from outside meddling?
posted by TBoneMcCool to technology (10 comments total)
In any case, you can edit ownership permissions on this file with the following command:
chmod 755 .htaccessThis will make the file writeable only by you, the owner. Everyone else can read the file but not make any changes.
posted by Rothko at 9:21 AM on July 21, 2005