SEO redirect on alias apparently wrong...

Discussion in 'General' started by doekia, Jul 2, 2014.

  1. doekia

    doekia Member

    Hi,

    I got the strange feeling that something is wrong with the SEO redirect option on site alias.

    USE CASES:

    Site: a-domain.com (auto www.)
    Alias: b-domain.com (auto www. + SEO: * => www.domain.tld )
    Expected Rewrite directing to be a-domain.com
    ---
    Site: a-domain.com (auto www.)
    Alias: b-domain.com (auto www. + SEO: *.domain.tld => www.domain.tld )
    Sound a bit over-complex imho, and again expecting www.a-domain.com as redirection target
    ---

    I also tend to think that there is a missing SEO option as:
    *.domain.tld => *.domain.tld
    With rule such as:
    RewriteCond %{HTTP_HOST} ^(.*)\.b-domain\.com$ [NC]
    RewriteRule ^(.*)$ http://%1.a-domain.com$1 [R=301,L]


    If anyone face similar issue a quick fix consists in implementing no SEO redirect thru the alias form and implement the RewriteRule in the apache directive for the site.

    Best,
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Both seo redirects are exactly as theyare intended. A redirect from the subdomain to the added alias domain, the redirect shall not go to the main domain of the website like you claimed above as the alias domain function is mostly used for multidomain cms systems, so the redirect rule may not change the domain name or the cms will fail.

    The redirect that you requested above is not the redirect of the seo redirect function, what you requested is the normal redirect which offers also a 301 redirect option were you can set the target domain in the redirect target field.
     
  3. doekia

    doekia Member

    I certainly missed the point here. In my mind a multi-domain cms system is domain aware hence no need to redirect up-front. The CMS route/dispatcher does so ... at least for those CMS I know

    Yes the alias to redirect to the main domain
    like domain.de , domain.fr, domain.co.uk been SEO redirected - ie: no duplicate content seen - to domain.com
    :)

    On the solution you propose (normal redirect), there is also an issue (I guess):
    Web Aliasdomain
    Aliasdomain: b-domain.com
    Parent Website: a-domain.com
    Redirect Type: R=301,L
    Redirect Path: http://www.a-domain.com
    Auto-Subdomain: www.
    SEO Redirect: none
    This does not redirect http://www.b-domain.com (no / in the url)
    This does not redirect http://www.b-domain.com/a-url to http://www.a-domain.com/a-url ( captured match not visible )
    If we try to *trick* set the redirect path to http://www.a-domain.com/$1,
    ERROR Invalid redirect path. Valid redirects are for example: /test/ or http://www.domain.tld/test/
    (safe error I think)


    I think that the SEO to parent is something missing. I use it a lot on various sites/CMS/eCommerce. Been easily settable from client panel be a nice addition.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I think we should add a option so that the seo redirect can either redirect to the alias domain or to the main domain.
     

Share This Page