Skip to content
fireproofsocks edited this page Dec 9, 2014 · 1 revision

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.

A1: Create a Context Setting for assets_url

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.

A2: Modify the Asset Manger settings

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.