Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
redirect a lot of pages
Hello all,
i need to permanent redirect a whole lot of pages on a page by page basis.
urls are in the form of /some-page?id=xy
and i need to redirect to /my-new-page
I first tried to set a RewriteCond / RewriteRule in a .htaccess for each page, but apache seems to choke on it after 3 or 4 rules.
what do you think would be the best to accomplish this ?
Try some apache voodoo i don’t know about ?
Write some callback function on pretext event to analyses each url, set the right header and redirect ?
Thanks for any insight.
Offline
Re: redirect a lot of pages
Hi, are these redirects due to your changing the permanent link mode? If this is the case I would recommend installing zem_redirect
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: redirect a lot of pages
No it’s a complete overhaul of a website.
We’re switching to Textpattern from a proprietary solution and the whole architecture has been redone.
Offline
Re: redirect a lot of pages
Forget my question.
Had a typo in my file :)
Anyway wandering if 20+ successive rewriterules in .htaccess is bad for performance ..
Offline
Re: redirect a lot of pages
planeth wrote #280269:
Anyway wandering if 20+ successive rewriterules in .htaccess is bad for performance ..
No. 20+ is managable. I’ve seen .htaccess with 300 rewrite rules and with no remarkable performance drop. But you could try to use summarized rules with regexes, if possible. And/Or – if possible too – flag each rule with the L (last), so that the mechanism stops looping through the rest of the (unused) rules.
Offline
Re: redirect a lot of pages
trenc wrote #280270:
No. 20+ is managable.
Good :)
But you could try to use summarized rules with regexes, if possible.
Tried that too but very few cases are in this category
flag each rule with the L (last), so that the mechanism stops looping through the rest of the (unused) rules.
done that too
Thanks for the good advice !
Offline
Pages: 1