Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
[htaccess] Any htaccess experts out there?
I’m stuck…. I need to add the posted Year (eg 2015 or just 15) and Month (eg 07) into 1 sections url and 301 redirect all the current permlinks to the new one!!
So the structure would be either (which ever is easiest… or the best):
www.domain.com/section/category/article/*DATE*
www.domain.com/section/category/*DATE*/article
www.domain.com/section/*DATE*/category/article/
I tried gbp_permanent_links – and it partly worked…. (the old urls did not redirect) but then I updated to 4.5.7 & it stopped working – shame, that is a great plugin.
Anyway – any help / advice welcomed :)
Cheers
Offline
Re: [htaccess] Any htaccess experts out there?
Hi tye,
I’d suggest you to try making gbp_permanent_links to work again. Although the plugin may (or may not) have issues with 4.5.7, it well could be that the plugin is just misbehaving. For experience, I can tell it could happen from time time.
I’d suggest you to try and delete/recreate some (or all) rules, and/or by re-installing the plugin.
If you get that solved & working, the remaining task (old urls redirecting to new ones) should be relative easy to implement solely in .htaccess.
On the other hand, going for an .htaccess-only solution is possible too, although I’d say that it will be a bit more painful to arrive to a solution, as you might already know that taming .htaccess is an obscure art by itself. But even going with .htaccess-only way could become easy if you are willing to include the article ID somewhere along the URL path (for example: www.domain.com/section/category/*DATE*/article-nice-url-*ID*
), which has the advantage of still being more user/SEO-friendly.
tye, sorry for I’m not providing the full solution (truth is: I don’t have it) but just a guidance to begin with.
Offline
Re: [htaccess] Any htaccess experts out there?
Thanks maniqui :)
I’ve already loaded ied_plugin_composer and am going to look over gbp_permanent_links to try and get it working again.
Thanks for the htaccess headsup… I might have a go at that too… not on a friday though, friday isn’t a htaccess day :)
Offline