ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Remove individual templates from URLs (like "categories")

September 22, 2008 3:07pm

Subscribe [1]
  • #1 / Sep 22, 2008 3:07pm

    jim2point0

    30 posts

    Hi.  I’ve already gone through the process of removing “index.php?” from my URLs, as well as my template group name.  Now my URLs are nice and tidy… except for my categories.

    Because I chose a keyword for showing category names in URLs, AND I have a template to handle individual category listings, the URLs get messy.  For example:

    http://www.mysite.com/categories/category/category_name

    categories/category/.... is just redundant.  I want to remove “categories” (which is the template name) from my URL, but leave the category keyword in there.  I looked at my .htaccess file and have an IDEA based on how I removed the template group name… but I dont want to break anything.  If anyone knows a surefire way to remove anything from their URLs, let me know.  A small explanation as to what the lines of code mean would be a big help 😊

    Thanks a lot!

  • #2 / Sep 23, 2008 1:51pm

    jim2point0

    30 posts

    Anyone?

  • #3 / Sep 23, 2008 2:17pm

    Lisa Wess

    20502 posts

    Hi, Jim -

    A few points for you regarding why you may not be receiving responses on this. Removing index.php is not supported (it is server reliant, not ExpressionEngine reliant) but is very common - we do it on our sites.

    However, removing the template group is strongly discouraged; the URL nomenclatures and semantics are inherent to ExpressionEngine, and removing the template group (and if you move forward, the category trigger) can and will have far-reaching and unpredictable consequences.

    You would be far better to name your segments semantically and move forward with the normal URL structure.

  • #4 / Sep 23, 2008 2:41pm

    jim2point0

    30 posts

    I’ve already removed index.php and template groups from my URLs.  It’s just a pickiness I have for the way they look.  And EE still functions quite well.

    However, the problem I’m having is the terrible inconvenience of using a category keyword, and not being able to use a template of the same name.  Therefore, I need a meaningful category template name, as well as the category keyword in my URL.

    If anyone can tell me a graceful solution to this problem, that would be fantastic.  Right now I have an archives page with various lists for finding posts easy.  One of those lists is “categories.”  Clicking on a category link will display a page with all posts in that category.  That is where my “categories” template comes into play, as I dont know how else to display that list of entries.  But the URL ends up being http://www.site.com/categories/category/category_name.  Blah!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases