Link to home
Start Free TrialLog in
Avatar of dmullis
dmullisFlag for United States of America

asked on

Bulk Changes to WP permalinks in .htaccess - blog post only

Hi all,

I have been assigned a task that is not my normal task and I need some advice.

In the .htaccess file, I need to change 300 blog posts in WP to have 'blog/'  included in the blog posts permalinks.

For instance, I need to change

"http://www.ronkramerlaw.com/texas-teen-loses-life-in-moab-car-crash/"
 to
"http://www.ronkramerlaw.com/blog/texas-teen-loses-life-in-moab-car-crash"

Is there a way to do this in bulk with code in the .htaccess file where it only affects the 'blog posts' and not other parts of the site?

TIA for your help.

Warm regards,
Deidre
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

>> Is there a way to do this in bulk with code in the .htaccess file where it only affects the 'blog posts' and not other parts of the site?
How can we recognise blog posts? Do they just start with a text like texas? Do non-blog posts start with something else like /doc or /image?
Avatar of dmullis

ASKER

Hi Gerwin,

Thank you for your timely  response.

All the blog posts links listed in WP (http://screencast.com/t/1AXVeu1sOF) do not have anything in common other than they are 'Posts' in WP and the domain name proceeds the blog post title with a slash. I can't find anything that distinguishes any of them .
ASKER CERTIFIED SOLUTION
Avatar of Gerwin Jansen
Gerwin Jansen
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dmullis

ASKER

Thanks Gerwin,

I see your point and this is what I needed to know!