Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/264.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/17.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
Php .htaccess将文件夹重写到子域错误_Php_Regex_Apache_.htaccess_Mod Rewrite - Fatal编程技术网

Php .htaccess将文件夹重写到子域错误

Php .htaccess将文件夹重写到子域错误,php,regex,apache,.htaccess,mod-rewrite,Php,Regex,Apache,.htaccess,Mod Rewrite,我有些东西卡住了。 我是配置 阿帕奇 我的网页返回内部服务器错误 如何配置.htaccess接受 查询: 它的意思是: test是根web目录中的一个文件夹 更新我的错误日志 [Sat Aug 22 21:29:58.093791 2015][core:error][pid 31081][client 192.168.83.1:7322]AH00124:由于可能的配置错误,请求超出了10个内部重定向的限制。如有必要,使用“LimitInternalRecursion”增加限制。使用“LogL

我有些东西卡住了。 我是配置 阿帕奇

我的网页返回内部服务器错误

如何配置.htaccess接受

  • 查询:
  • 它的意思是:
  • test是根web目录中的一个文件夹
更新我的错误日志

[Sat Aug 22 21:29:58.093791 2015][core:error][pid 31081][client 192.168.83.1:7322]AH00124:由于可能的配置错误,请求超出了10个内部重定向的限制。如有必要,使用“LimitInternalRecursion”增加限制。使用“LogLevel debug”获取回溯跟踪。参考:

test.example.com端口80上的Apache/2.4.10(Ubuntu)服务器


thk's any得到一个提示

您的规则是无限循环的,最终导致500个错误。要停止,您可以使用此附加条件:

RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ^(.+)\.example\.com$ [NC]
RewriteRule ^(.*)$ %1/$1 [L]
%{ENV:REDIRECT_STATUS}
是一个内部
mod_rewrite
变量,在第一次内部重写后设置为200。

“内部错误”的意思是:查看
错误日志。它失败的原因有一个更具体的原因。(禁用mod_rewrite或rewrite引擎或AllowOverride等)
RewriteCond %{HTTP_HOST} ^(.+)\.example\.com$ [NC]
RewriteRule ^(.*)$ /%1/$1 [QSA,L]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{HTTP_HOST} ^(.+)\.example\.com$ [NC]
RewriteRule ^(.*)$ %1/$1 [L]