Skip to Content
Menu
This question has been flagged
1 Reply
8877 Views

Hello,

I'd like to know how to add an html file in the root directory so we can access it by www.mydoamin.com/file.html

I tried to add it by activating developer mode via setting -> technical -> database structure -> attachments 

but it gives me 404 file not found when I visit the page www.mydoamin.com/file.html

Any idea how to configure it in a proper way?

Thanks

Avatar
Discard
Best Answer

Hi youta

You cannot do it like that, Odoo is not an PHP application or something similar, there is no root directory where you can put that html file in order to access it like that, but you have a lot of options to get that result.

- Use a reverse proxy(nginx, haproxy, caddy, ...) in front of your Odoo so you can map the url /file.html with the real file

or

- Install Odoo website in your database and create a new page to serve the content of that file by copy its content to the new page, normally if you name your page file.html the url will be /page/file.html

or

- Put your file.html in the static folder of any module and you will be able to access it like, /module_name/static/file.html

or

- Create a controller that serve the content of that file as response from /file.html, the content could be taken from the real file or better from a cached Odoo template in the Odoo way to make this kind of controllers

Avatar
Discard
Author

Thank you Alex, I'll try one of those

Sorry, it's axel 😉

Related Posts Replies Views Activity
2
Nov 24
25064
2
May 24
5510
3
Mar 24
4961
0
Mar 24
261
3
Feb 24
11415