Create Grav multi domain setup

Discussion in 'Installation/Configuration' started by Dennis_sp, Aug 20, 2019.

  1. Dennis_sp

    Dennis_sp Member


    I'm using for creating two online manuals, one in Dutch the other in English. I have created two domains for this:
    I'm using the translation feature of Grav, that means each page has two versions and by placing /nl or /en at the end of the URL you will get your language. According to the Grav documentation you can create rewrite rules that point you to the right language based on the URL:

    I have a domain in ISPconfig that points to the site and i have an alias called pointing to the site.
    I have placed the rewrite rules in the Options>Apache directives tab:

    # handle top level e.g.
    RewriteRule ^nl/?$ "" [R=302,L]
    RewriteRule ^en/?$ "" [R=302,L]
    # handle sub pages, exclude admin path
    RewriteCond %{REQUEST_URI} !(admin) [NC]
    RewriteRule ^nl/(.*)$ "$1" [R=302,L]
    RewriteCond %{REQUEST_URI} !(admin) [NC]
    RewriteRule ^en/(.*)$ "$1" [R=302,L]
    However when i go to it still points to the default language and shows this url: instead of /en.
    Did i set this up correctly in ISPConfig or is this a Grav issue?
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    I think the software only deals with a single domain but multiple language folders but I could be wrong.
  3. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    On the ISPConfig side, try creating as a vhost alias domain.

Share This Page