Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a site that apparently has "dirty URLs". For example a URL that I have goes something like this:

www.website.com/article?articleID=2 or something along the lines of that. This, to me, seems to be the only valid way of using these URL's for a dynamic site. Is there a way to change them to say, www.website.com/article?

share|improve this question

You should not just remove the ID because it's important to know which article we are opening, you should rewrite it using .htaccess's mod_rewrite.

What will you rewrite it to depends on the nature of your website and your strategic choices, it can be just:


Or if the title of the article can be found elsewhere, you can make it:


Or even:


share|improve this answer
Is there another way of perhaps sending the ID to the page? – ReallyGoodPie Aug 1 '13 at 15:31
the way of sending the ID through URL won't change, the rewrite engine will receive www.website.com/title-goes-here-id for example and calls www.website.com/article?articleID=id. All you have to do is find some tutorials of .htaccess URL rewriting. – heytools Aug 1 '13 at 15:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.