Permalink
Browse files

Added RewriteBase in htaccess

  • Loading branch information...
lowki committed May 17, 2013
1 parent 1d22985 commit ae0c030d076be511f03e92781b8a212a7db4ad55
Showing with 8 additions and 1 deletion.
  1. +1 −0 .htaccess
  2. +7 −1 setup/SlSetup.php
@@ -25,4 +25,5 @@ RewriteRule article-([0-9]+).* index.php?mod=sl_articles&id=$1 [L]
#php_value error_reporting 30719

#Rewrite responsive images only to show_image script
RewriteBase /
RewriteRule (medias/(?:images|attachments)/.*\.(?:jpe?g|gif|png|JPE?G|GIF|PNG))(?:/(\d*\w*))?(?:/(\d*\w*))? core/common/class/functions/includes/show_image.php?url=$1&width=$2&height=$3
@@ -226,6 +226,7 @@ private function install(){
if(!$fatals){
// Create config file
if(!copy($source,$dest)) $fatals[] = "Erreur lors de la création du fichier de configuration";
$config = file_get_contents($dest);
$config = str_replace("_bdd_host",$_SESSION['bdd_host'],$config);
@@ -243,7 +244,12 @@ private function install(){
$config = str_replace("_site_name",$_SESSION['site_name'],$config);
$config = str_replace("_site_url",$_SESSION['site_url']."/",$config);
file_put_contents($dest, $config);
}
// Replace RewriteBase line in htaccess
$htaccess = file_get_contents("../.htaccess");
$htaccess = str_replace("RewriteBase /", "RewriteBase ".$_SESSION['site_path'], $htaccess);
file_put_contents("../.htaccess", $htaccess);
; }
$this->view->loadInstall($fatals);
}

0 comments on commit ae0c030

Please sign in to comment.