X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fplugins%2Faccesrestreint_3_5%2Finc%2Faccesrestreint_documents.php;fp=www%2Fplugins%2Faccesrestreint_3_5%2Finc%2Faccesrestreint_documents.php;h=339d0eb7f2240d315b047c95ffc2e44460994a96;hb=bca3db9e1ab94e469b01f7e994a5e095de5f88c4;hp=1c29a762b63e93a7488d2e4cb1facf04b6b93d41;hpb=b97874b04ea8ca43d21b7ef7309feff8ef0e4a07;p=ptitvelo%2Fweb%2Fwww.git diff --git a/www/plugins/accesrestreint_3_5/inc/accesrestreint_documents.php b/www/plugins/accesrestreint_3_5/inc/accesrestreint_documents.php index 1c29a76..339d0eb 100644 --- a/www/plugins/accesrestreint_3_5/inc/accesrestreint_documents.php +++ b/www/plugins/accesrestreint_3_5/inc/accesrestreint_documents.php @@ -34,6 +34,17 @@ RewriteCond %{QUERY_STRING} ^(\d+/[\da-f]+)$ RewriteRule ^\w+/.*$ ../spip.php?action=api_docrestreint&arg=%1/$0 [skip=100] RewriteRule ^\w+/.*$ ../spip.php?action=api_docrestreint&arg=0/0/$0 [skip=100] rewrite; + + // On cherche si le dossier racine a un RewriteBase plus long que "/" + if (file_exists(_DIR_RACINE._ACCESS_FILE_NAME)){ + $ht = ''; + lire_fichier(_DIR_RACINE._ACCESS_FILE_NAME, $ht); + if ($ht and preg_match('|^RewriteBase\s+/.+$|m', $ht, $rewritebase)){ + $rewritebase = rtrim(trim($rewritebase[0]), '/').'/'._NOM_PERMANENTS_ACCESSIBLES; + $rewrite = $rewritebase."\n".$rewrite; + } + } + ecrire_fichier(_DIR_IMG . _ACCESS_FILE_NAME,$rewrite); // verifier sur l'url de test include_spip('inc/distant');