Scaraux
Scaraux

Reputation: 4152

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.

Upvotes: 2

Views: 552

Answers (1)

M. Kebza
M. Kebza

Reputation: 1508

If you are using apache and default .htaccess then if file exists in public / web directory then it will be served directly.

Upvotes: 2

Related Questions