Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Rewrite old section to new
Hi,
We have a section name that has to be changed. Only there are a few articles that need to stay accessible with the old and new url. I tried to make a rewrite rule that covers this but I can’t get it working as it should. It rewrites to the new section but doubles the article title… What goes wrong here?
This is the rewrite rule:
RewriteRule ^oldsection/(.*) https://domain.com/newsection/$1 [R=301,L]
I also tried:
RewriteRule ^oldsection/(.*)$ https://domain.com/newsection/$1 [R=301,L]
But with both rules this happens:
https://domain.com/oldsection/article-name => https://domain.com/newsection/article-name/article-name
What do I have to change to make this work?
Kees
Offline
#2 2017-10-17 20:34:55
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Rewrite old section to new
This works in my .htaccess:
Redirect permanent /oldsection http://domain.com/newsection
Offline
Re: Rewrite old section to new
Thanks Els! How easy can it be…
Kees
Offline
Pages: 1