// Fix virtual uri rewrite in htaccess + keep old specific code in htaccess
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7980 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
3957de6087
commit
f4a3e88283
1 file changed
+9
-3
+9
-3
@@ -1546,7 +1546,13 @@ class ToolsCore
|
|||||||
$specificAfter = $m[2];
|
$specificAfter = $m[2];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$specificBefore = $content;
|
{
|
||||||
|
// For retrocompatibility
|
||||||
|
if (preg_match('#\# http://www\.prestashop\.com - http://www\.prestashop\.com/forums\s*(.*)<IfModule mod_rewrite\.c>#si', $content, $m))
|
||||||
|
$specificBefore = $m[1];
|
||||||
|
else
|
||||||
|
$specificBefore = $content;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write .htaccess data
|
// Write .htaccess data
|
||||||
@@ -1582,12 +1588,12 @@ class ToolsCore
|
|||||||
if ($uri['virtual'])
|
if ($uri['virtual'])
|
||||||
{
|
{
|
||||||
fwrite($writeFd, 'RewriteCond %{HTTP_HOST} ^'.$domain.'$'."\n");
|
fwrite($writeFd, 'RewriteCond %{HTTP_HOST} ^'.$domain.'$'."\n");
|
||||||
fwrite($writeFd, "RewriteRule ^".ltrim($uri['virtual'], '/')."/(.*) ".$uri['physical']."/$1 [L]\n\n");
|
fwrite($writeFd, "RewriteRule ^".ltrim($uri['virtual'], '/')."(.*) ".$uri['physical']."/$1 [L]\n\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Webservice
|
// Webservice
|
||||||
fwrite($writeFd, 'RewriteRule ^api/?(.*)$ '.$uri['physical']."webservice/dispatcher.php?url=$1 [QSA,L]\n\n");
|
fwrite($writeFd, 'RewriteRule ^api/?(.*)$ '."webservice/dispatcher.php?url=$1 [QSA,L]\n\n");
|
||||||
|
|
||||||
if ($rewrite_settings)
|
if ($rewrite_settings)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user