Forums

[resolved] Permanet Link .htaccess File and Domain Alias (2 posts)

  1. sipylus
    Member
    Posted 2 years ago #

    We have a 3 year old site (.org) and a 2 year old site (.com) and would like to redirect the .com to the .org as it is more well known.

    Our problem is, if we use "domain alias" to avoid hosting the .com site, the permalink .htaccess file does not allow our root .htaccess file to redirect to the correct URL thus creating duplicate content.

    # [ CP Global Redirection - Start ]
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^example.org$ [NC]
    RewriteRule ^(.*)$ http://example.org/$1 [L,R=301]
    </IfModule>
    # [ CP Global Redirection - End ]

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /guide/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /guide/index.php [L]
    </IfModule>

    # END WordPress

    ex-ample.com/guide/ to example.org/guide/

  2. sipylus
    Member
    Posted 1 year ago #

    Resolved.

Topic Closed

This topic has been closed to new replies.

About this Topic