.htaccess - Wordpress url redirect better approach -
. . . . how doing
i have wordpress blog 29 posts. url structure was
http://www.domain.com/category/cat_name/post_name/
which have changed
http://www.domain.com/post_name/
using permalink settings. wanted older links work did redirects using htaccess
redirect 301 /categories/cat_name/post_name/ /post_name/
i have checked links , working.
now need know approach or better approach it. doing redirects 29 links?
try de function get_page_by_path($args) of core of wordpress.
see docs in http://codex.wordpress.org/function_reference/get_page_by_path
get lucky.
Comments
Post a Comment