WordPress.org

Ready to get started?Download WordPress

Forums

Domain redirect and mask ? (2 posts)

  1. djpechi
    Member
    Posted 1 year ago #

    Hi, I'm having a problem and looking if someone can help, this is what I have:

    1. I created a complete WP website on thisdomain.mx for a client

    2. The client has thisdomain.com and has nothing on it and want to redirect to thisdomain.mx

    I am looking for a way to do it with .htaccess, I found some other forum post here and I dont understand well, I have to modify the .htaccess file on thisdomain.com right?

    I tried:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.thisdomain\.mx$ [NC]
    RewriteRule ^(.*)$ http://thisdomain.mx/$1 [R=301,L]

    And nothing happens, does this has something to do with domain propagation or something?

    Thank you
    Kind Regards

  2. linux4me2
    Member
    Posted 1 year ago #

    You're putting this in the .htaccess file on thisdomain.com, right?

    Then I think you'd want:

    RewriteEngine On
      RewriteCond %{HTTP_HOST} ^thisdomain.com$ [OR]
      RewriteCond %{HTTP_HOST} ^www.thisdomain.com$
      RewriteRule (.*)$ http://thisdomain.mx/$1 [R=301,L]

Topic Closed

This topic has been closed to new replies.

About this Topic