URL Rewriting, how to avoid URL embarrassment?

In the script that displays the article, check that the requested URI matches the pretty hyphenated title as computed from the article title in the database. If it doesn't match, do something like a 404 For example, if you have the article's real title in $article'title' have the title part of the requested URI parsed as $requested_title and pretty_for_uri($input) turns a string into a URI-friendly, hyphenated string, you'd want to check that $requested_title == pretty_for_uri($article'title').

In the script that displays the article, check that the requested URI matches the pretty hyphenated title as computed from the article title in the database. If it doesn't match, do something like a 404. For example, if you have the article's real title in $article'title', have the title part of the requested URI parsed as $requested_title and pretty_for_uri($input) turns a string into a URI-friendly, hyphenated string, you'd want to check that $requested_title == pretty_for_uri($article'title').

From poking around the net it seems most people throw a 301 to the canonical URL for the article. I think I'll go down that route, ta! – Robb Apr 21 at 10:29.

The above trick works because it ends in . Html and the part between the section of the paper and the id is ignored. Just try independent.co.uk/life-style/food-and-dr... which works as well.

The bad url did not come from a url-shortener, but rather from a brain-dead url-expander and URL scheme that the independent has. A real url-shortener should create something like (what you wrote) /news/article. Lang?

ArticleID=123and then check that the entered url follows that form.

The bad url did not come from a url-shortener, but rather from a brain-dead url-expander and URL scheme that the independent has. A real url-shortener should create something like (what you wrote) /news/article. ArticleID=123and then check that the entered url follows that form.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions