Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-12-16 15:49:16

RipvanFish
Member
Registered: 2009-07-09
Posts: 35

Clean URL's -> same scheme for articles and category possible?

Hi there,

I have another clean url’s related question, hope it is ok to open another thread, since the other one was solved.
Right now I’m using this scheme: domain.com/section/title which is fine, but for a special section (/publikationen/)
i want to use this: section/category/.
I’m ok with hard coding these few links, but i cant write a working rewriterule to pass /category/ as if it was /?c=category.
This is what i have as ruleset.

    RewriteEngine On
    #RewriteBase /relative/web/path/
    # Force Apache to use WWW
    RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
    RewriteRule ^(.*) http://www.domain.com/$1 [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+) - [PT,L]
    #add trailing slash
    RewriteRule ^(.+[^/])$ http://www.domain.com/$1/ [R=301,L]
    RewriteRule ^(.*) index.php
    RewriteCond %{HTTP:Authorization}  !^$
    RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]@

Is there a way to extend this to make it work? So everything that is the second folder behinder the sektion name is (internally) passed to txp (or php in this case) as get-var c?

regards,
rvf

{Edited for better code readability -Uli}

Last edited by uli (2011-12-16 15:52:31)

Offline

#2 2011-12-16 21:01:50

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Clean URL's -> same scheme for articles and category possible?

You can do that with gbp_permanent_links.

Offline

Board footer

Powered by FluxBB