Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/symfony/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在.htaccess symfony2中重写映射rnd_.htaccess_Symfony_Rewritemap - Fatal编程技术网

在.htaccess symfony2中重写映射rnd

在.htaccess symfony2中重写映射rnd,.htaccess,symfony,rewritemap,.htaccess,Symfony,Rewritemap,我目前正在尝试使用2台带有symfony2的服务器进行简单的随机负载平衡 在/web.htaccess文件中,我尝试了很多组合,但结果总是空的,我看不到调试的方法。有什么可以帮忙的 .htaccess文件: <IfModule mod_rewrite.c> RewriteEngine On RewriteMap servers rnd:/map.txt RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ app.php [Q

我目前正在尝试使用2台带有symfony2的服务器进行简单的随机负载平衡

在/web.htaccess文件中,我尝试了很多组合,但结果总是空的,我看不到调试的方法。有什么可以帮忙的

.htaccess文件:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteMap servers rnd:/map.txt

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,PT]
</IfModule>

重新启动发动机
重写地图服务器rnd:/map.txt
重写cond%{REQUEST_FILENAME}-f
重写规则^(.*)$app.php[QSA,PT]
map.txt也在/web文件夹中。
当我添加行
RewriteMap服务器rnd:/map.txt

时,问题就出现了。请注意“上下文”:谢谢,将RewriteMap放在.htaccess文件中成功了。