Check out Glinski's Hexagonal Chess, our featured variant for May, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Semantic URLs[Subject Thread] [Add Response]
🕸Fergus Duniho wrote on Mon, Mar 14, 2016 05:38 PM UTC:

I successfully started to implement semantic URLs for script-generated content. I have started with the script for displaying person information. For example, my person information page normally has the URL:

http://www.chessvariants.com/index/displayperson.php?personid=FergusDuniho

But it also now has the semantic URL of

http://www.chessvariants.com/person/FergusDuniho

The benefits to semantic URLs include these:

  • They are easier to remember.
  • They can remain the same even when the location of the script changes.
  • Search engines will take note of them.

As a test, I used the new Google custom search feature I added yesterday to search for "Yang Qi", which I knew Charles Gilman has referred to in some of his pages. Looking through the entire search results, not one msdisplay.php page came up.

So I want to use semantic URLs for pages generated through msdisplay.php. The question is how to best design the semantic URLs. It looks like itemids can begin with either MS, MZ, or MP. Are there any more prefixes? I want to leave these prefixes out of the semantic URLs but capture the information contained in them. MS is usually for game rules, though there are exceptions, MZ is for Zillions files, and MP is for play-by-mail, which is normally for Game Courier.

In rewriting index scripts to write the semantic URLs, I could access information from the database and include it as a non-essential part of the semantic URL. I was thinking of including the author's personid in something like /member/(personid)/(type)/(truncated itemid). This would be the word "member," followed by the author's personid, followed by the page's type, such as Game, Zillions, PBM, etc, followed by the itemid without the MS/MZ/MP prefix. In the .htaccess code for rewriting the URL, the type would provide the information needed to know whether to use MS, MZ, or MP for the actual itemid. It's also possible to just go with something like /userdoc/(type)/(truncated itemid). What are your thoughts or suggestions on this?