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?

1 Answer 1


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:


  • Is there another way of perhaps sending the ID to the page?
    – Brandyn
    Aug 1, 2013 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, 2013 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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