Above webroot + localization

I'm trying to run statamic v2 above the webroot and everything works except when trying to access localised version.

I have /public as webroot which have:

- assets
- en
  - index.php ($statamic = '../../statamic';)
- themes 
- index.php ($statamic = '../statamic';)

When i'm trying to access routes:

http://localhost:3000/ <- works
http://localhost:3000/events <- works
http://localhost:3000/any-other-page <- works
http://localhost:3000/en <- "works"
http://localhost:3000/en/events <- doesnt work (404)
http://localhost:3000/en/any-other-page <- doesnt work (404)

Also when trying to access localhost:3000/en page, there are many errors related to debugbar: http://localhost:3000/en/_debugbar/assets/javascript?v=1586186427 <- 404

I tried the setup with fresh install of statamic v2:


  • statamic new testsite etc installer stuff
  • cd testsite and run valet link statamic
  • create a new locale (fi) with these steps: https://docs.statamic.com/localization
  • localize one page (I changed title on contact page to finnish)
  • create /public folder and move index.php, fi-folder, assets-folder and themes folder as said here: https://docs.statamic.com/knowledge-base/running-above-webroot
  • update valet to point to public folder (cd public and run valet link statamic
  • change site/settings/system.yaml:
    driver: local
    root: public/themes
    url: /themes

Then try to access:

http://statamic.localhost/ <- works
http://statamic.localhost/contact <- works
http://statamic.localhost/fi <- works, (images not shown)
http://statamic.localhost/fi/contact <- click contact link on navigation to access this page, doesnt work 404

Any ideas?

>>>>>>> Unanswered <<<<<<<
3 Replies