Skip to content

Instantly share code, notes, and snippets.

@dchatry
Last active November 5, 2015 14:57
Show Gist options
  • Select an option

  • Save dchatry/9e0ef631424d0e306d62 to your computer and use it in GitHub Desktop.

Select an option

Save dchatry/9e0ef631424d0e306d62 to your computer and use it in GitHub Desktop.
[Drupal] Clean URL for files
# Clean URL for files in Drupal
#
# Replace : http://www.site.com/sites/default/files/myfile.txt
# by : http://www.site.com/files/myfile.txt
# Be careful to put this rule before any other blocking rule.
RewriteRule ^files/(.*)$ /sites/default/files/$1 [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment