We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19354
    • 7 Posts
    Hi there,

    I have two domains linking to one and the same modx:
    www.mydomain.de (main)
    www.my-domain.de

    If I use ajaxsearch on "mydomain.de" all works fine.
    If I use it on "my-domain.de" there is no result.

    Both domains links to the same directory on my server and the same modx installation.

    Any ideas why this happens, or better: how can I fix this issue?


    Thanx,
    mickna
      • 19354
      • 7 Posts
      I guess this could be an issue with the <base href="[(site_url)]">??

      Anyway, my solution seams also to be more SEO.
      Filled in a rewrite 301 in my .htaccess.

      RewriteCond %{HTTP_HOST} .
      RewriteCond %{HTTP_HOST} !^www\.mydomain\.de$  [NC]
      RewriteRule (.*) http://www.mydomain.de/$1 [R=301,L]
      


      So my-domain.de (and all other redirects to this directory like m-y-d.de") will "converted" to "www.mydomain.de"

      thx,
      mickna