Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2008-05-09 22:57:54
- Kachii
- New Member
- Registered: 2008-05-03
- Posts: 4
Rewriting one page's URL
Here’s the deal:
I have the htaccess file:
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /relative/web/path/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php
RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
#php_value register_globals 0
And I have an article in section ‘computing’ with the title ‘python’ that I can access through mysite.com/computing/python/
I have used PHP to separate up the article so that different sections of it can be accessed using mysite.com/computing/python/?section=one
But obviously due to SEO I would like to rewrite this url to something like mysite.com/computing/python/section/one
But TXP’s htaccess is greedy, and won’t let me do this, it seems. Either that or I made a typo in my .htaccess.
Does anybody have a solution?
I tried adding a simple rewrite rule to the top of the file, but it didn’t work:
RewriteEngine on
RewriteRule ^tp/computing/python/section/([^/\.]+)?$ http://domain.com/tp/computing/python/?section=$1 [L]
Thanks for your help in advance.
(Why can I not disable textile?)
Last edited by Kachii (2008-05-09 22:59:49)
Offline
Offline
Re: Rewriting one page's URL
Try gbp_permanent_link.
It’s pretty customizable and is working fine, after you got your head around it… :)
Z-
Offline
#4 2008-05-10 15:29:01
- Kachii
- New Member
- Registered: 2008-05-03
- Posts: 4
Re: Rewriting one page's URL
Zanza wrote:
Try gbp_permanent_link.
It’s pretty customizable and is working fine, after you got your head around it… :)
Z-
I’ve tried that one, it doesn’t work for this type of URL that I’m trying to do, because it’s not a redirection to any specific category or article, it’s just the same static page split up into sections.
Offline
Pages: 1