Hi, I’m using HostGator to host my custom domain. I have a subdomain (let’s call it sub.dom.com). In the Obsidian Publish > Site options > Configure custom domain, I specify the custom url as sub.dom.com. (When I go to https://publish.obsidian.md/serve?url=sub.dom.com/ it displays the pages as expected).
But now I want to be able to access this page from my subdomain.
The official Obsidian docs use an example for a sub-url path (dom.com/my-notes), but I want to go from the subdomain sub.dom.com to my Obsidian publish instead.
In the .htaccess file for sub.dom.com, I can’t figure out how to make it work. I’ve tried:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://publish.obsidian.md/serve?url=sub.dom.com/ [P]
and
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://publish.obsidian.md/$1
But they both don’t work. When I remove the Rewrite condition, I get a 500 error.
Thank you in advance for your help!