URL naming conventions

So it could be a gang of worms. But I'm curious what are you doing?

For example, suppose your site consists of the following needs (very basic):

  • Landing page
  • Event Information Page (Static)
  • List of locations for this event (dynamic)
  • Information page for each place

Having said that, how would you create your urls?

Generally, I would do something like the following:

www.domain.com/- landing page [also available through www.domain.com/home] www.domain.com/event - event information www.domain.com/places - list of all places www.domain.com/places / {id} - place the information page

Now, here is the question. Just grammatically speaking, I have a hang to refer to this place in the URL as a plural. Isn't it worth it to make sense of this:

www.domain.com/place/{ID} unlike www.domain.com/places/{id}

In some frameworks, you adhere to the convention by default (e.g. ASP.NET MVC). Yes, you can define custom routes to have a / place / {id} route in the PlacesController. However, I'm just trying to keep this a bit abstract in the discussion.

With that said, let's look, for example, on another page of your site, you have a link that, when clicked, will open a modal pop-up window with information about the place. Where do you post this information?

We could go something like this:

www.domain.com/ajax/places/{ID} www.domain.com/places/{id} ( JSON JSON?}.

, SEO slug, . , - :

www.domain.com/ajax/places/{ID}/

, SEO. ?

, , , , , .

!

+3
1

URL , , .

SEO-, , .

, URL-, . "?" . , , , - , , ? , URL- www.domain.com/place/, .

, , , , , , . , " - ", , , ".

0

Source: https://habr.com/ru/post/1749436/


All Articles