Craft CMS Multilingual/Multidomain base setup

1
2
<?php
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Make sure all your domains point to the same public/www directory. Don't set the locale (CRAFT_LOCALE) in the index, but let the configuration handle it for you.

With this setup, you can point multiple domains to your Craft setup:

craft.it.local
craft.nl.local
craft.it.dev

The configuration sets the siteUrl based on $_SERVER['SERVER_NAME'] and copies it to the baseUrl setting. Set global settings in the '*' array; overrule for specific domains.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.