Fix Textpattern: Clean URLs Don’t Work

admin-ajax

Textpattern CMS is a content management system with an element of flexibility. You can, for instance, write articles and use static pages to populate a website on the Internet or your organisation’s intranet. Articles invariably have their own individual URLs, such as:

  • http://example.com/?id=3
  • http://example.com/3/a-story-about-my-cat
  • http://example.com/stories/3/a-story-about-my-cat
  • http://example.com/2014/10/01/a-story-about-my-cat
  • http://example.com/stories/a-story-about-my-cat
  • http://example.com/a-story-about-my-cat

If you’re familiar with the structure of URLs, most of the above list should make sense. Note that in this example list there is a Textpattern article with an ID of 3, hence the 3 reference, and all the URLs can refer to this one article. Out of the box — and yes, I know, Textpattern doesn’t have a real box as such — the first format of URL is used. This format is referred to as messy or `?=messy`. It’s the default because it works without any tweaking or poking, and has no barrier to entry.

It can, however, be changed to something that’s more pleasing to humans and search engines. Note how all but the first URL above mention the title of the article, and give a good clue as to what the article is about. Humans and search engines love this kind of information. The URL format is set in the administration side of Textpattern in the Admin → Preferences → area. You can select whatever format you like, depending on how important this kind of thing is to you and your users.

You may encounter 404 errors if you switch away from the default (messy) URL format. These 404 errors occur because of a problem with the URL rewriting side of the web server. In the first instance, check for the Textpattern URL rewrite configuration file. Textpattern includes a file called `.htaccess` in its distribution and in some operating systems, notably UNIX and GNU/Linux-based, filenames that begin with `.` are hidden by default. To ensure the `.htaccess` file is correctly uploaded to your web server, ensure your FTP client has the option to show hidden files. Arvixe hosting has no problem running Textpattern with the default `.htaccess` file. It will operate smoothly and as expected. As an extension to this, the Apache web server rewriting module is loaded by default, so if you do encounter 404 errors on non-messy URLs, it’s most likely to be a missing or broken `.htaccess` file.

Looking for quality Textpattern Hosting? Look no further than Arvixe Web Hosting and use coupon TEXTPATTERN for 20% off your first invoice!

Tags: , , , , , , , , , , , , , , , , | Posted under Textpattern | RSS 2.0

Author Spotlight

Pete Cooper

Pete Cooper has been using Textpattern since 2005. Textpattern is his preferred CMS weapon of choice. Its logical and flexible approach to content management makes Pete happy, as does its lightweight core and helpful user community. Pete's website - petecooper.org - runs on top of Textpattern and chronicles his day-to-day experiences from his home near the Atlantic in north Cornwall, United Kingdom.

Leave a Reply

Your email address will not be published. Required fields are marked *