0

My blog URLs look like this /blog/?action=viewArticle&articleId=2

I want them to look more like this: /blog/name-of-article

I've Googled, read a number of topics here on Stackoverflow, tried tweaking my .htaccess file, but nothing's working.

I'm not well versed on .htaccess or mod_rewrite tactics, and I'm not one to ask for help unless I really get stuck, so.... Help! :-)

Thanks!

J.Young
  • 41
  • 1
  • 5
  • What content management system are you using? Is it WordPress, something else, or did you code your own blog? – Stephen Ostermiller Nov 12 '21 at 17:38
  • 1
    It won't be possible to implement what you want with just mod_rewrite. That module can rewrite `/blog/name-of-article` to `/blog/?action=view&articleName=name-of-article` but it can't translate names into IDs, your blog software has to handle that. mod_rewrite also won't change the links in your pages to make them into the friendly version, again your blog software will have to do that. – Stephen Ostermiller Nov 12 '21 at 17:40
  • I coded my own blog, with some help from a friend who's no longer available to help. I don't necessarily need to be handed the exact code I need, but point me in the right direction would help immensely. :) – J.Young Nov 12 '21 at 18:35
  • Does this answer your question? [Reference: mod\_rewrite, URL rewriting and "pretty links" explained](https://stackoverflow.com/questions/20563772/reference-mod-rewrite-url-rewriting-and-pretty-links-explained) – MrWhite Nov 13 '21 at 00:30

0 Answers0