Content last modified Tuesday 24 August 2021
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

You know you want to visit the Archives.
Published with Textpattern