craftcms - How to correctly set path for a folder outside the root? - Stack Overflow

I am using CraftCMS, and my file structure is this -root folder-craft-httpdocsInside the 'craf

I am using CraftCMS, and my file structure is this -

root folder

-craft

-httpdocs

Inside the 'craft' folder there is a config.php file where I need to set the path and site URL. It looks like this -

    'siteUrl' => [
        'en_ca' => '',
        'fr_ca' => '',
    ],
     'environmentVariables' => [
      'basePath' => '../httpdocs',
      'baseUrl'  => '',
    ]

Since the path for this file is inside the craft folder, /craft/config.php and it needs to navigate to /httpdocs inside the root, I use ../

This works fine for website in this example, but when I go to website/fr for the French site there is an error that it cannot find ../httpdocs

If I change the path to ../../httpdocs then website/fr loads correctly, but of course website does not

How can I update the path so it works for both?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745352451a4623915.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信