Is this valid and correct?
RewriteRule ^myOldPage.html$ /index.php#info [R]
I’m specifically interested about the #info part.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes. That’s a valid 301 redirect (the HTTP standard allows for any valid URI to be provided as the redirect).
Now the caveat: Not all search engines may love the redirect. Google does a fantastic job of handling anchor tags (they even have a patent on this), while others will completely ignore them. As long as that’s not an issue, the redirect is technically valid.
Update: If you’re having trouble with mod_rewrite, try the NE (no escape) flag to prevent the # symbol from getting encoded: