I've already looked at many samples and tutorials how to set up those 301 redirects on Apache and can't figure out why some are not working. Whenever I want to redirect any still existing page from the old domain to the new domain the page on the old domain is still used. But it "works" if you type in a page which does not exist on the old domain. The same is true for directories which do not exist on the old domain. So whenever you type a non-existing URL (page or folder) the redirections is taking place (but of course produces 404 errors of on the new domain).
In addition it also works for the domain name itself. So just typing "old.com" correctly redirects to "new.com".
Any input is much appreciated because this is slowly driving me crazy :)
EDIT: I added the complete htaccess file.
EDIT 2: So I removed almost all redirects and currently my htaccess looks like this:
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^old\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.old\.com$
RewriteRule ^(.*)$ "http://www.new.com/$1" [R=301,L]
The only redirect that is working is the simple one from old.com to new.com. A redirect like old.com/page.htm to new.com or even new.com/page.htm is not working.
EDIT 3: This is the .htaccess of the top-level domain:
# -FrontPage-
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.toplvl.com
AuthUserFile /home2/a_user/public_html/_vti_pvt/service.pwd
AuthGroupFile /home2/a_user/public_html/_vti_pvt/service.grp
RewriteCond %{HTTP_HOST} ^toplvl.com [OR]
RewriteCond %{HTTP_HOST} ^www.toplvl.com
RewriteRule ^(.*)$ http://www.toplvl.com/$1 [L,R=301,NC]
RewriteRule
substitution (2nd argument) is a normal string, not a regular expression, so ordinarily you do not need to escape anything or surround it in double quotes. You've tagged your questioncPanel
- however, I assume you aren't using cPanel to apply these redirects (cPanel is likely to cause more problems)?old.com
tonew.com
worked OK, butold.com/page
tonew.com/page
didn't - I can't find it though at the mo.)