Hello,
I am trying to set up a .htaccess file for my WordPress blog. I have searched a few websites to try to figure out how to create one, and to no surprise when I copy and paste codes in it and host the file I get an internal server error… I want to use permalinks on my blog. I am unsure of what I am doing wrong, or what it is I need to have to get my .htaccess file to work. My Apache version is: 2.2.13 (Unix), PHP version is: 5.2.*, and MySQL version is: 5.0.81-community.
Here is my code:
protect the htaccess file
<files .htaccess>
order allow,deny
deny from all
</files>
protect wpconfig.php
<files wp-config.php>
order allow,deny
deny from all
</files>
disable directory browsing
Options All -Indexes
protect from spam comments
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\\.php*
RewriteCond %{HTTP_REFERER} !.*http://robertii.webege.com/.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
Any help would be awesome!