我正在使用友好的 URL,如下所示:
http://localhost/gallery/photo/this-is-a-url-friendly-photo-caption
在友好 URL 上,我需要添加照片的 ID,但环顾四周,我看到了将 ID 添加到友好 URL 的两种方法,pre 和 post,就像这样
http://localhost/gallery/photo/this-is-a-url-friendly-photo-caption.529
或者
http://localhost/gallery/photo/529/this-is-a-url-friendly-photo-caption
使用一种方式有优势吗?或者这只是一个偏好/个人品味的问题?