WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Moving from SubDomains to Sign Domain - Trying To Redirect Posts (3 posts)

  1. Jud Mackrill
    Member
    Posted 3 months ago #

    I am moving from a subdomain environment where there were unique posts for multiple subdomains. The posts have been moved into a single site and I am trying to make sure that I handle the redirection properly.

    Essentially, I'd like to make the following update:

    Old post structure: http://subdomain.domain.com/2013/12/post-name-goes-here.html

    Desired post structure: http://domain.com/2013/12/post-name-goes-here.html

    Any tips would be much appreciated. Hopefully I'm just overlooking something simple.

    Thanks!

  2. RewriteEngine On
    RewriteCond %{HTTP_HOST} !^domain\.com$ [NC]
    RewriteRule ^(.*)$ http://domain.com%{REQUEST_URI} [R=301,L]

    Replace domain.com with yours and place this in the directory of the sub-domain(s).

  3. Jud Mackrill
    Member
    Posted 3 months ago #

    Thanks Patrick - this issue ultimately fell back a Microsoft DNS issue.

Reply

You must log in to post.

About this Topic