Norbert McDorbert
Member
Posted 6 months ago #
Hello
I need to create an htaccess rule to redirect my old posts to the new structure to avoid broken links
currently its
/post_id/postname
want to change to
/catname/postname
Normally a regex would work for a this to that, but as its a dynamic number, I cant figure out how to do it. Any advice?
ken1990julius
Member
Posted 6 months ago #
you can check rewrite API in the documentation(codex) for this.
Norbert McDorbert
Member
Posted 6 months ago #
I am not asking how to Change permalinks.
Asking how to create a rule in htaccess to redirect broken permalinks.
Try Advanced Permalinks plugin - http://wordpress.org/extend/plugins/advanced-permalinks/
It's features list has,
301 redirect old permalink structures (many structures are allowed)
Norbert McDorbert
Member
Posted 6 months ago #
thanks all.
i saw yoast wrote a plugin for it, but that is for
X+Y to go to /posttitle/
Was hoping someone was good with regex, so I could do an HTACCESS mod.
http://yoast.com/change-wordpress-permalink-structure/
(scroll down)
Andrew Bartel
Member
Posted 6 months ago #
Why not give it a shot yourself Norbert and see if it works? If you're unable to find a solution, you could post in a dedicated htaccess forum?
Norbert McDorbert
Member
Posted 6 months ago #
Hey Andrew.
The code yoast provides is good, however, I just cant grasp how to redirect to categories
I didnt even know about the Htaccess cat. Man this place is huge ;)