Status |
Proposal needs feedback |
Target Release |
4.1 |
Original Authors |
Dave Johnson and Sean Gilligan |
Abstract
This is a proposal to enable subdomain and/or multi-domain support in Roller. It is based on Dave's work in Proposal Simple Multidomain Support but provides for explicit support for subdomains and stores custom URLs for weblogs in the weblog table rather than in roller-custom.properties
.
Requirements
- Allow Roller to use blog handles as subomains (e.g.
http://handle.baseurl.com
) - Allow one Roller instance to specify different URLs for different weblogs, stored in the database
- Ensure that each weblog is only accessed by one root URL
Issues
- Is this design flexible enough to meet most of the requests we've seen so far?
- How to avoid a repeat of "handle" in the pathInfo of the URL (e.g.
http://handle.baseurl.com/handle
) - Requires adding URL column to weblog table
- How much refactoring is required to achieve DRY in the URL resolution code?
Design
Weblog.getAbsoluteURL() uses URLStrategy to return URLs
public String getAbsoluteURL() { URLStrategy urlStrategy = WebloggerFactory.getWeblogger().getUrlStrategy(); return urlStrategy.getWeblogURL(this, null, true); }
Weblog.getURL() calls Weblog.getAbsoluteURL()
public String getURL() { return getAbsoluteURL(); }
Configuration
Server Administrator
Roller deployment is configured by the server administrator with the following settings:
- Configurable URL strategy
- Current Strategy (http://blogs.baseurl.com/handle
)
- Subdomain Strategy (http://handle.baseurl.com
)
- Current Strategy (http://blogs.baseurl.com/handle
- Boolean setting to enable/disable per-blog custom URLs (in roller-custom.properties)
Blog Administrator
Blog administrator can enable a custom domain on a per-webblog basis (if enabled by the server admin)
- Requires an additional setting on the Weblog Settings UI screen (hidden when disabled)
- Custom domains on Weblogs might require the subdomain URL strategy
Comments
Please comment on the Roller dev mailing list.