J
Just Me
OK, this is sort of a two part question here.
The scencario is that I am building an article.aspx page which takes a
parameter ( ArticleID ) and this represents an article in the database. This
all works fine and as its a public site, google has index it.
Now I read somewhere that adding extra information in the url might give the
document score on google extra points so I thought, ok why not just add some
hyphen seperated keywords to the parameter and simply strip those off when
the articel.aspx loads, for example. Article.aspx
?ArticleID=9119_asp.net-2.0-xml-datagrid
So the code inside discards everything from the '_' onwards and uses the
numeric value to lookup the article. OK thats the easy bit. Because this is
a url, Im assuming I cant use special characters like '.' '#'' etc etc as
they have special meaning in the url.
1.) So Is the special character issue also applied to query strings, in
other words, should they also be escaped as well. ?
2.) Does anyone have code like a set of regexes expressions or something
which will automatically encode the special characters, what I guess Im
looking for is something which will turn this for example
Article.aspx?ArticleID=9999_asp.net, visual studio, xml,
Into
Article.aspx?ArticleID=9999_asp%nn-net-visual-studio-xml
Any help would be apprciated
The scencario is that I am building an article.aspx page which takes a
parameter ( ArticleID ) and this represents an article in the database. This
all works fine and as its a public site, google has index it.
Now I read somewhere that adding extra information in the url might give the
document score on google extra points so I thought, ok why not just add some
hyphen seperated keywords to the parameter and simply strip those off when
the articel.aspx loads, for example. Article.aspx
?ArticleID=9119_asp.net-2.0-xml-datagrid
So the code inside discards everything from the '_' onwards and uses the
numeric value to lookup the article. OK thats the easy bit. Because this is
a url, Im assuming I cant use special characters like '.' '#'' etc etc as
they have special meaning in the url.
1.) So Is the special character issue also applied to query strings, in
other words, should they also be escaped as well. ?
2.) Does anyone have code like a set of regexes expressions or something
which will automatically encode the special characters, what I guess Im
looking for is something which will turn this for example
Article.aspx?ArticleID=9999_asp.net, visual studio, xml,
Into
Article.aspx?ArticleID=9999_asp%nn-net-visual-studio-xml
Any help would be apprciated