I've tried dozens of different "solutions" and syntaxing (Redirect, RewriteCond, RewriteRule, Redirect 301, etc) and I just can't get this to work. I often get the "redirect loop" -error or the redirect doesn't work at all, or I get it working with only www.thesite.com and not http://www.thesite.com
What I want to do:
When the user goes to mysite.com I want him or her redirected to mysite.com/#anchor
And if the user goes to www.mysite.com I want him or her redirected to mysite.com/#anchor as well
...and if the user goes to http://www.mysite.com I want him or her redirected to mysite.com/#anchor
...and yea, I can only get one of these working at a time (or I get a loop).
My .htaccess file without any redirects:
Code:
# enable basic rewriting
RewriteEngine on
# enable symbolic links
Options +FollowSymLinks
# enable allowoverride privileges
<Directory /www/replace/this/with/actual/directory>
AllowOverride Options
</Directory>
# do not allow anyone else to read your .htaccess file
<Files .htaccess>
deny from all
</Files>
# forbid viewing of directories
Options All -Indexes
# disable the server signature- helps with preformance
ServerSignature Off
Bookmarks