• Resolved madbaby

    (@madbaby)


    Hi Matthias,

    I would like to map https://www.parc3-cheras.com to https://www.cariharta.com/new-launch/parc3-cheras.

    However, https://www.parc3-cheras.com redirect to https://www.cariharta.com without mapping (URL changed as well). I had tried the two option below, but no luck.

    $_SERVER[“SERVER_NAME”] (default)
    $_SERVER[“HTTP_HOST”]

    Prior to this, the parked domain/alias work correctly without changing the URL https://www.parc3-cheras.com. I try to deactivate the plugin and but now it remains redirect behaviour. I try to hard code the followings, and the parked domain work as normal again.

    define(‘WP_HOME’, ‘https://’ . $_SERVER[‘HTTP_HOST’]);
    define(‘WP_SITEURL’, ‘https://’ . $_SERVER[‘HTTP_HOST’]);

    FYI, I also have the following in .htassess to rewrite non-www & http to www & https:

    RewriteCond %{HTTP_HOST} !^www\.(.+)$ [NC]
    RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
    RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule ^/(.*)$ https://www\.%{HTTP_HOST}/$1 [R=301,L]

    RewriteCond %{SERVER_PORT} !^443$
    RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
    RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
    RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]

    Any idea on how to make the mapping works? I had tried your plugin at other site but never encounter this before.

    Thanks for your time ??

    • This topic was modified 5 years, 10 months ago by madbaby.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author matthias.wagner

    (@matthiaswagner)

    do you have both versions of http and https in your mappings? see the faq & screenshots for this.
    also, are you 100% sure you have your browser cache disabled and emptied all the time while testing?

    please remove the WP_HOME, WP_SITEURL before testing again, since it is not necessary for the plugin to work, as you have seen in your other sites ??

    please try this out and if you still have troubles, also post a screenshot of your plugin-settings.

    matt

    Thread Starter madbaby

    (@madbaby)

    Hi @matthiaswagner,

    Yup. I reopen the incognito window every time just to make sure it clear the cache…

    I had add another versions of https://www.parc3-cheras.com, https://parc3-cheras.com and it works now but it no longer rewrite non-www to www now. Is this plugin overwrite all .htaccess rules on the mapped domain?

    Other link such as https://www.parc3-cheras.com/privacy-policy where original alias to https://www.cariharta.com/privacy-policy is on page 404 now.

    I try disable the plugin and https://www.parc3-cheras.com now redirect to https://www.cariharta.com. Is it a permanent change to the setting in WP? If so, where can I change back to the original? I might consider a redirect measure.

    Here is the settings of your plugin on $_SERVER[“SERVER_NAME”] (default)

    View post on imgur.com

    Thanks ??

    Plugin Author matthias.wagner

    (@matthiaswagner)

    you will need to enter the non-www before the www-version:

    1) https://domain.com
    2) https://domain.com
    3) https://www.domain.com
    4) https://www.domain.com

    yes, i know this is annoying and will be better in the next version ??

    we do not change any settings and also do not change anything in the .htaccess file. if you have parc3-cheras.com/privacy-policy entered, it will look for cariharta.com/new-launch/parc3-cheras/privacy-policy. does this page exist?

    matt

    Thread Starter madbaby

    (@madbaby)

    Thanks for your reply, @matthiaswagner.

    I get what you mean.

    The page is under cariharta.com/privacy-policy. I’m wonder if it is possible, to make a wishlist for the upcoming update that is to mapped the domain root only to a specific url and to preserve the functionality of domain alias.

    Anyways, appreciate your support.

    Have a nice day.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fail to mapped…redirect to root of primary domain’ is closed to new replies.