Created
July 18, 2016 17:40
-
-
Save PascalAnimateur/edf2c4caa60f9f697d81a2dfda8b3c3b to your computer and use it in GitHub Desktop.
Revisions
-
PascalAnimateur revised this gist
Jul 18, 2016 . No changes.There are no files selected for viewing
-
PascalAnimateur created this gist
Jul 18, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ <?php function site_redirect_provision_apache_vhost_config($uri, $data) { $rval[] = ''; $rval[] = '# Redirect all files public path to sites/$uri/files'; $rval[] = 'RewriteEngine On'; $rval[] = "RewriteCond %{REQUEST_URI} !^/sites/$uri/files"; $rval[] = "RewriteRule ^/sites/[^\/]*/files/(.*)$ /sites/$uri/files/$1 [R=301,L]"; $rval[] = ''; return $rval; } ?>