Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-08-20 06:20:20

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

[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

#2 2015-08-20 12:06:22

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

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.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#3 2015-08-21 01:31:32

tye
Member
From: Pottsville, NSW
Registered: 2005-07-06
Posts: 859
Website

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

Board footer

Powered by FluxBB