• Resolved drummergirl

    (@drummergirl)


    I just setup a custom post type and imported my shop from a subdomain (multisite) so that all of my post are now on the same www domain. My original subdomain was keyword.mydomain.com and I’ve moved all of my posts from that domain to a custom post type with a slug of ‘keyword’.

    So instead of having links like: keyword.mydomain.com/link/
    I now have https://www.mydomain.com/keyword/links/

    My thoughts were that I could setup a rewrite in the htaccess to redirect the links from the subdomain to the new custom post type directory.

    After some fiddling, I found that I can at least get these domain links to resolve to the www home page through a subdomain with a redirect in my cpanel. This of course is not what I want, but of the various rewrites and redirects I’ve tried in my htaccess file, none seem to work. I’ve tried them with and without the subdomain listed in the cpanel.

    The main issue I come up against is that if I try to set the cpanel subdomain redirect to https://www.mydomain.com/keyword/ then my custom post types stop resolving.

    Any pointers to cleaning up this mess?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter drummergirl

    (@drummergirl)

    Still drawing a blank on this. Anyone have any idea if I should have the old subdomain listed in cpanel or not?

    I was thinking it could all be handled in the htaccess file, but I seem to get closer results with the subdomain present in cpanel and redirecting to the main domain (although it sends them to my 404 page, at least it gets them to the domain as opposed to a 500 error or something).

    Thread Starter drummergirl

    (@drummergirl)

    Solved it. Just had to move my rewrite rule ABOVE the wordpress rules.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need to resolve custom post type and subdomain conflict’ is closed to new replies.