N
N
nikonovichk2021-08-10 20:42:12
PHP
nikonovichk, 2021-08-10 20:42:12

How to make a unique link to a news post?

I have news articles in a database and also a single news page template. Thanks to the unique “ID” when you click on a news post, the site understands this and transfers us to the template page and together with us sends it this unique “ID” (numbers, like 1.2 ... in short, according to the standard) and I get a link mysite /news/post.php?id=1

I need a unique link for each post, so that people don't throw such an ugly link (long and with "?id=1" at the end) to each other.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
no_one_safe, 2021-08-10
@nikonovichk

http://mysite/news/1/
apache
nginx

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question