301 redirect through PHP in Wordpress
I've recently discovered that using /%postname%/ only for permalinks on posts in Wordpress is not scalable. My site has currently a small number of posts (25) and about 35 pages. Likely I will eventually have 100s of posts, so before it's too late it seems I need to change Permalinks.
Initially tried to look into htaccess rewrite, but Apache experts said that htaccess can't know postid, so the 301 redirect needs to be done through PHP script. I'm looking into PHP files in wordpress and wondering which file (and line of code) I need to change to accomplish this.
Anyone knows what I need to change in wordpress to redirect from:
from domain.com/postname
to domain.com/postid/postname
It would help a lot. Thanks in advance.
-
Bruce Hearder -
Thanks
{{ DiscussionBoard.errors[497138].message }} -
-
MemberWing -
Thanks
Signature| Law of Attraction Coaching | Secure Fast Hosting | Law of Attraction |{{ DiscussionBoard.errors[498982].message }} -
-
justinkaiser -
Thanks
{{ DiscussionBoard.errors[502453].message }} -