Why offer a path support?

Some people may have an old system that uses a certain number of paths. Say you have an existing static website that is 1,000 pages. Converting it to the new system would take a while and is not a necessity. Instead, you use the new system with a sub-folder in your URL:

  http://www.example.org/snapwebsite/...

Here the snapwebsite participates in the website selection (see Website Selector and URL Basics).

Root Problems

There is one huge drawback with this technique: all the files found at the root of a website will still be found at that root. This includes files such as robots.txt, sitemap.xml, list of pad files, etc.

Thus, a website with a root path of /snapwebsite/ defined like this:

  http://www.example.org/snapwebsite/

will be making use of the robots.txt defined here:

  http://www.example.org/robots.txt

instead of:

  http://www.example.org/snapwebsite/robots.txt

which means it won't give you the right robots.txt file!

Although all those files found at the root of your website are useful, they are not mandatory. In such a case, it may be better to not have them at all.

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly