Mobile app version of vmapp.org
Login or Join
Odierno851

: Removing "Dirty URLs" 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

@Odierno851

Posted in: #Php #Url #UrlRewriting

I have a site that apparently has "dirty URLs". For example a URL that I have goes something like this:
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, website.com/article?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Odierno851

1 Comments

Sorted by latest first Latest Oldest Best

 

@Voss4911412

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:
website.com/title-goes-here
Or if the title of the article can be found elsewhere, you can make it:
website.com/title-goes-here-id
Or even:
website.com/category-name/title-goes-here-id

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme