Domain mapping does not work for sub page/post

Domain mapping works for the homepage, I can reach the homepage. But when I click post or page it gives 404 not found error. I tried a plugin conflict test, but it didn't help. How can I solve this?

  • Ash
    • WordPress Hacker

    Hello LegendaryHalo

    Who is your host? Also, is it apache or nginx server?

    It seems a mod_rewrite related issue, but it works for original domain. So, is it possible for you to contact the host if they have any domain restriction for the htaccess or other config? I am saying because, if I use default url like: http://mapped-domain.io/?p=1 then it works (it redirects to actual url).

    Please let us know what you hear back from the host. Have a nice day!

    Cheers,
    Ash

  • LegendaryHalo
    • New Recruit

    My host is Rackspace and it's an apache server. There are no domain restrictions for the .htaccess file which you should be able to see since you have the FTP credentials. The problem is not mapping the domain and getting it to redirect. The problem is that the only page we can access is the front page any other pages cannot be accessed if you click on a link for example Uncategorized, December 2017 or Hello world! in the side navigation you get a 404 not found.

  • Ash
    • WordPress Hacker

    Hello LegendaryHalo

    There are no domain restrictions for the .htaccess file which you should be able to see

    Actually, I mean, if there is any restriction in the server level that the htaccess will work for main domain only. When you access /hello-world/ URL, that is handled by mod_rewrite module and we write supported code in the htaccess file. So, if that htaccess is not allowed to use for the additional domain, then URL rewriting will not work for that.

    About the FTP, it didn't work for me. Would you please check again and send me updated FTP or cPanel (cPanel is better if possible) information?

    You can send me privately in the following format:
    1. Please go to https://premium.wpmudev.org/contact/#i-have-a-different-question
    2. Select "I have a different question" if not selected
    3. In subject line put "Attn-Ash" (this will ensure that the email is assigned to me)
    4. Provide the wanted details.
    5. Add the thread link in the message so that I can track.

    Have a nice day!

    Cheers,
    Ash

  • Ash
    • WordPress Hacker

    Hello LegendaryHalo

    Thanks for sending new FTP details. I have seen some unusual settings on wp-config.php and I fixed those:

    1. site url and home url define do not work on multisite
    2. You didn't have secured auth keys on wp-config.php, I have enabled those

    But unfortunately none of those fixed the original issue. And after doing some more testing, I am pretty sure the htaccess is not working for the mapped domain.

    For that, I need to check the configuration file. Would you please send me the vhost conf file that you created for the mapped domain? Also, make sure there is not the following line:

    AllowOverride None

    If you have, then htaccess won't overwrite the server default settings, that means, the htaccess won't work for that domain.

    Please let me know how it goes. Have a nice day!

    Cheers,
    Ash

  • LegendaryHalo
    • New Recruit

    I'm not sure what your asking for here when you say "Would you please send me the vhost conf file that you created for the mapped domain?". Would you like to she what was done to point thelegends.io to legendary-man.com? Here's a snipp from a chat with a linux tech that might help

    "To make this change, I edited the file /etc/httpd/vhost.d/thlegends.io.conf and changed the 'DocumentRoot' line from this:

    DocumentRoot /srv/www/thlegends.io

    to this:

    DocumentRoot /srv/www/legendary-man.com

    The change was made on two lines - one for the HTTP virtual host, and one for the HTTPS version. After making the changes I ran apachectl configtest to make sure there were no syntax errors. Then I restarted Apache and you and I both tested the home page of the site, which rendered as you expected."

    If that's not what you need please clarify what you're needing I'll get it to you as quickly as possible.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.