简体   繁体   中英

Symfony 3 serve static html file at root

I made a few months ago a symfony website for a client.

Today he asks me to add a simple static html file to the root of the website, that contains nothing but a hash. (This file will be used by a community manager to register the website somewhere).

Then I asked myself, what is the simplest way to tell Symfony to serve this static html file just as simple apache would do, by just placing it to the root folder ?

To be clear, this file must be accessed at the root level, just as an index file. What makes it not convenient is that its name is a hash itself.

如果您使用的是apache和默认的.htaccess文件,则如果文件存在于public / web目录中,则将直接提供该文件。

您的apache / nginx配置是什么样的?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM