Host HTML page on Discourse install

Hi,

As mentioned in my previous posts, I migrated my WordPress blog to Discourse.

There was an HTML page on my site that was hosted inside a folder in public_html

So, its URL was example.com/foldername

Now, I want to host the same folder/page again, but with Discourse.

Where should I put this folder so that I get the same URL structure without breaking my Discourse site?

That’s tricky, because Ember/Rails would try to interpret that as an app route … which doesn’t exist.

I would step back if I were you and reconsider what you are ultimately, functionally trying to achieve and see if there isn’t another way to go about it?

One option is to use this:

Another option might be to host that page on a sub-domain, rather than a folder (and all that entails).

2 Likes

Thanks @merefield for your response.

Page publishing and subdomain won’t work. The only option other than hosting in the folder is hosting the folder on a new domain, which won’t be good for SEO as I won’t have all the authority of my actual domain.

Is there any way to fulfill my purpose using a plugin?

Well you can create a new route in a plugin and put whatever you want on it.

But a simple version of that will still run “inside” Discourse.

Take a look at my Word Cloud or Community Network plugin code to see how that is done.

2 Likes

Okay, I will. Thank you

You could also host it elsewhere and use a Cloudflare workers route to make it look like a folder within your forum.

2 Likes

I don’t know how to do that. Is there any guide for it? Please share :slight_smile:

Google is your friend…!

https://www.codiva.io/blog/post/host-saas-product-blog-in-subdirectory-instead-of-subdomain/

1 Like