on my MAMP server I have the htaccess file in the wordpress directory - it should be wrtiabel so wordpress can change it when you change the permalinks. Below is what I have in mine - this is copied from the web I do not know HTACCESS so I can't explain it all to you - check the web for that info
I run on a mac so the '/~userid/yoursite/index.php' is pointing to the folder 'yoursite' that is in the 'sites' folder of my user 'userid' (it's actually not 'userid', it is myname)
here is the htaccess file
HTML Code:
# ==========================================================
# protect the htaccess file
# ==========================================================
<files .htaccess>
order allow,deny
deny from all
</files>
# ==========================================================
# disable the server signature
# ==========================================================
ServerSignature Off
# limit file uploads to 10mb
LimitRequestBody 10240000
# ==========================================================
# protect wpconfig.php
# ==========================================================
<files wp-config.php>
order allow,deny
deny from all
</files>
# ==========================================================
# who has access who doesnt
# ==========================================================
order allow,deny
#deny from 000.000.000.000
allow from all
# ==========================================================
# custom error docs
# ==========================================================
ErrorDocument 404 /notfound.php
ErrorDocument 403 /forbidden.php
ErrorDocument 500 /error.php
# ==========================================================
# disable directory browsing
# ==========================================================
Options All -Indexes
#redirect old to new
Redirect 301 /old.php http://www.yourdomain.com/new.php
# ==========================================================
# block referring domains
# ==========================================================
RewriteEngine on
RewriteCond %{HTTP_REFERER} digg\.com [NC]
RewriteRule .* - [F]
# ==========================================================
# disable hotlinking of images with forbidden or custom image option
# ==========================================================
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?yoursite.org/.*$ [NC]
#RewriteRule \.(gif|jpg)$ - [F]
#RewriteRule \.(gif|jpg)$ http://www.yoursite.org/stealingisbad.gif [R,L]
# ==========================================================
# php compression - use with caution
# ==========================================================
#<ifmodule mod_php4.c>
#php_value zlib.output_compression 16386
#</ifmodule>
# ==========================================================
# set the canonical url
# ==========================================================
RewriteEngine On
RewriteCond %{HTTP_HOST} ^yoursite\.org$ [NC]
RewriteRule ^(.*)$ http://www.yoursite.org/$1 [R=301,L]
# protect from spam comments
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*yoursite.org.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /~userid/yoursite/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . [L]
</IfModule>
# END WordPress