Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If the "Absolute path (relative to document root)" option is selected on the filter settings form, only links to nodes are affected, but not files. Thus, files are always rendered as absolute URLs.
Since file_create_url() always returns absolute URLs, the only way to do this is to remove the base_url from the returned path in _pathfilter_process_files(). This is accomplished in the provided patch.
Comment | File | Size | Author |
---|---|---|---|
pathfilter.module.patch | 723 bytes | joelstein |
Comments
Comment #1
mrfelton CreditAttribution: mrfelton commentedGood catch, and patch. This has now been applied to D6 and 5 branches in CVS.