Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2011-01-21 05:39:15
- zeusdidit
- Member
- Registered: 2007-10-16
- Posts: 111
How do I change .htaccess file so section/title goes to just /title?
I’ve been crawled by google and some articles still point to section/title instead of just /title. I’d like to use the .htaccess file to fix this if possible in case other pages are getting lost.
Help
thanks,
Zeus
Offline
Re: How do I change .htaccess file so section/title goes to just /title?
Do you have /title as a permlink mode in the admin>preferences?
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: How do I change .htaccess file so section/title goes to just /title?
zeusdidit a écrit:
I’ve been crawled by google and some articles still point to section/title instead of just /title. I’d like to use the .htaccess file to fix this if possible in case other pages are getting lost.
This usually happens when you’ve been crawled when admin>preferences was set to /section/title, then changed to /title.
Here is the .htaccess directive to redirect old urls to new ones, assuming that url titles contain only lowercases and hyphens :
RewriteRule ^name-of-the-section\/([a-z-]+)$ /$1 [R=301,L]
Change name-of-the-section with the actual name. Of course you will have to write this line for each section.
Offline