-
Notifications
You must be signed in to change notification settings - Fork 15
Q: How can I make my assets use an absolute URL like https://mysite.com/ ?
Sometimes you may want to specify a full URL for your assets. Maybe you are generating an RSS feed or maybe your page is being sent out as the text of an email, or maybe you want to customize the URL to make use of a custom port or a custom domain where you can serve static images.
There are a couple ways to do this.
See this forum post.
The assets_url
System Setting is a bit of an oddity: unlike most System Settings, you cannot edit it inside the main MODX System Settings. It is set inside the core/config/config.inc.php
file, so you may be tempted to edit the setting there... however that doesn't work -- it can break the manager.
You can, however, create a Context Setting for assets_url
and override the value there.
-
assman.url_override
=> Yes -
assman.site_url
=> https://yoursite.com/
By setting assman.url_override
to Yes, the assman.site_url
will be used to create the asset URL instead of the MODX assets_url
.
© 2014 and beyond by Craftsman Coding