Convert user title (text) to URL, what instead spaces, #, & and other characters?

Posted by Thomas on Stack Overflow See other posts from Stack Overflow or by Thomas
Published on 2010-05-28T06:48:49Z Indexed on 2010/05/28 6:51 UTC
Read the original article Hit count: 219

Filed under:
|
|
|
|

I have some form on the website where users can add new pages. I must generate SEO friendly URLs and make this urls unique. What characters can I display in url, I know that spaces I should convert to undescore:

" "->"_" and before it - underscores to something else, for example:

""->"()"

It is easy make title from url back. But what in my specific title can be all characters from keyboard, even : @#%:"{/\';.>

Are some contraindications to don't use this characters in URL? Important for me is:

-easy generate url and title from url back (without queries to database)

-each title are unique, so url must be too

-SEO friendly URLs

© Stack Overflow or respective owner

Related posts about url

Related posts about website