Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
About It:
Rate it:
  • Helpful?
  • 0 Yes
  • 0 No
Flag it:

If you'd like to provide updated information and do not have access to directly edit, please contact the site admin; thanks!

Clean URLs in Textpattern

The URLs at my site follow the format suggested by Mamash in one of his older posts in the textpattern forum, with some slight variation. Basically, a URL (Uniform Resource Locator) at my site has the form http://www.domain.com/section/category/page-X/, where X is the page number. If the user is browsing by category, but not in a particular section, then the section becomes ’-’, so the URL would be something like http://www.domain.com/-/category/page-X/. The reason for using a dash as opposed to a word, like ‘category’, is that this may suggest that ‘category’ is a section of the site, which is it not.

The page can be ommited, as can the category, as can the section. Here are some example URLs from my site.

http://www.funkaoshi.com/page-2/—second page of the default section http://www.funkaoshi.com/-/web-design/—the first page of the category webdesign http://www.funkaoshi.com/immaculate/life/page-3/—the third page of the life category in the immaculate section

The trick to cleaner URLs is cleaning up the paging links, and cleaning up the links to articles in a particular category. Once these generated URLs are cleaned up, we will use a .htaccess file to convert the clean URLs back to messy URLs that textpattern can understand.

More information is available at the Information URL below.

Article Request Count:
Initially released:
April 29, 2004 ?
Posted here:
17 Dec 2004
Article modified:
17 Mar 2005

If there is a comment form at the Information URL, you may want to leave your comments/questions there for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (1)

This information is out of date, and not needed any longer for Textpattern 4.0, which supports clean URLs out of the box.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern