# Dynamische pagina's hosten met discourse

**URL:** https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682
**Category:** Support
**Created:** [28 december 2024 om 17:49 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682 "2024-12-28T17:49:46Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [28 december 2024 om 17:49 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/1 "2024-12-28T17:49:47Z")

</div>

Is there a way to host dynamic pages with Discourse? I looked into the Landing Page Plugin, but it’s for static pages. I don’t mind having Discourse on the main domain itself instead of a subfolder, although I know I can build dynamic pages in subfolders then. Is there any alternative or a way to do this by keep Discourse in the main dir itself and adding dynamic pages to a folder?

What I mean is, I’m on the domain [www.example.com](http://www.example.com), which has Discourse running on it. Can I create a separate folder on the same domain where I can host dynamic pages, like [www.example.com/dynamic-folder/index.php](http://www.example.com/dynamic-folder/index.php)?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [28 december 2024 om 22:44 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/2 "2024-12-28T22:44:13Z")

</div>

Discourse doesn’t use php, so you can’t host php files with discourse.

You can do anything that php can do with a plugin, however. It’s very different than php, though.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [28 december 2024 om 23:12 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/3 "2024-12-28T23:12:19Z")

</div>

As i red the question is can a directory, as part of an url, be outside Discourse or Docker (docker is very difficult consept to understand for me) and therefor use PHP.

Or — can, for example, a reverse proxy redirect calls so that directory part is taken care by something like LAMP, and everything else goes to Discourse. Then it is only matter of two backends, right?

Actually I’m quite sure, in theory anyway, that could be made using Varnish. What I don’t know, among really many things, what kind of conflict will happen if/when that url is called inside Discourse. Or is it even then only matter of redirects.

---

<div class="post-metadata">

### Author: ![Jagster](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jagster/32/192154_2.png) [@Jagster](https://meta.discourse.org/u/Jagster)
#### Post date: [28 december 2024 om 23:18 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/4 "2024-12-28T23:18:35Z")

</div>

However — that question is off topic in this category, because solution would be something else than standard.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [28 december 2024 om 23:40 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/5 "2024-12-28T23:40:16Z")

</div>

> [@MihirR](#):
>
> I looked into the Landing Page Plugin,

That’s not true, it has the Home Pages extension which allows for dynamic pages.

> [@Landing Pages Plugin small\_airplane](https://meta.discourse.org/t/landing-pages-plugin/180967/95):
>
> Just to point out you can now display arbitrary pages within Discourse using the Landing Pages Plugin in combination with a couple of extensions:

---

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [29 december 2024 om 09:02 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/6 "2024-12-29T09:02:18Z")

</div>

Okay, need to give it a shot then :))

---

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [29 december 2024 om 09:03 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/7 "2024-12-29T09:03:31Z")

</div>

Actually, I guess I should give it a try on a dummy community first to check if it works fine and doesn’t cause any issues or conflicts.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [29 december 2024 om 10:01 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/8 "2024-12-29T10:01:55Z")

</div>

What is it that you need your interactive page to do?

---

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [29 december 2024 om 10:10 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/9 "2024-12-29T10:10:46Z")

</div>

It was supposed to handle some API queries mainly :))

---

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [29 december 2024 om 10:11 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/10 "2024-12-29T10:11:20Z")

</div>

Thanks @merefield, I have installed the plugin and will update you asap.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [29 december 2024 om 13:04 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/11 "2024-12-29T13:04:21Z")

</div>

So these api inquiries have to do with data in discourse? Can you be more specific.

---

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [29 december 2024 om 13:08 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/12 "2024-12-29T13:08:46Z")

</div>

Not really, it’s more like a custom feature I’d like to add. It doesn’t have anything to do with Discourse, t’s more of a custom PHP page where I can fetch data using an API mostly intended from Crunchbase and make some processes work.

Also, is it possible to run HTML CSS JS here? Maybe using the landing page plugin itself or through some other method?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [29 december 2024 om 13:56 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/13 "2024-12-29T13:56:59Z")

</div>

See [Developing Discourse Plugins - Part 1 - Create a basic plugin](https://meta.discourse.org/t/developing-discourse-plugins-part-1-create-a-basic-plugin/30515) [Theme Developer Quick Reference Guide](https://meta.discourse.org/t/theme-developer-quick-reference-guide/110448)

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [29 december 2024 om 14:00 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/14 "2024-12-29T14:00:46Z")

</div>

Yeah, if you are accessing remote data, which might require API keys, do that in a Plugin so the API keys can be kept secure and private and used only in the back-end.

Home pages is purely a front-end extension.

---

<div class="post-metadata">

### Author: ![MihirR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mihirr/32/475158_2.png) [@MihirR](https://meta.discourse.org/u/MihirR)
#### Post date: [29 december 2024 om 17:00 UTC](https://meta.discourse.org/t/hosting-dynamic-pages-with-discourse/344682/15 "2024-12-29T17:00:11Z")

</div>

Yes, that’s the reason I was actually asking if we can add a folder to keep the key safe in a `.env` file. Also, I tested the plugin, it works great thank you! :))
