How to handle #(hash) character in SEO friendly url?

Posted by arvinsim on Stack Overflow See other posts from Stack Overflow or by arvinsim
Published on 2011-01-14T03:04:31Z Indexed on 2011/01/14 3:53 UTC
Read the original article Hit count: 160

Filed under:
|
|
|

How do you bypass the default behaviour if #(hash) which is to go to a specific part of a page? The problem that I have is that the # character is a part of the SEO friendly url which is a title and the #(hash) is part of the content (i.e. like with C#). I can't retrieve the whole string and I only get the characters before the #.

Example:

www.domain.com/C#-programming-book

in this example I only get 'C' and not the '-programming-book' part. I am not using any javascript at the moment and would like to only use a PHP solution for this.

Before anyone suggests that I used url encoding, the criteria for the seo friendly url is that it should be human readable and easily remembered. So converting the hash to '%23' does not pass the criteria.

Is there no way around it?

© Stack Overflow or respective owner

Related posts about php

Related posts about url