title: Redirect 301 with hash part (anchor) #
body: <p>One of our website has URL like this : <code>example.oursite.com</code>. We decided to move our site with an URL like this <code>www.oursite.com/example</code>. To do this, we wrote a rewrite rule in our Apache server that redirect to our new URL with a code 301.</p>
  
  <p>Many websites link to us with URLs of the form <code>example.oursite.com/#id=23</code>. The problem is that the redirection erase the hash part of the URL with IE. As far as I know, the hash part is never sent to the server.</p>
  
  <p>I wanted to implement the redirection with javascript to keep the hash part, but the Search Engine will not be aware that our URL changed. (no code 301 returned)</p>
  
  <p>I want the Search Engine to be notified of our new URL(301) because we need to transfer the page rank to our new URL.</p>
  
  <p>Is there a way to redirect with a 301 code and keep the hash part(<code>#id=23</code>) of in the URL ?</p>