应用程序遇到重定向循环错误WildFly8

Naa*_*aaN 8 jboss wildfly-8

我试图将服务器从Jboss 4.2.2迁移到WildFly-8.2.0.在部署war文件时遇到一些问题.战争正在部署,但网址重写会产生问题.

对于4.2.2,rewrite.properties在localhost文件夹中调用的文件中写入了相同的文件.

RewriteCond %{REQUEST_URI} !^(.*)[.]([a-zA-Z]+)$
RewriteRule ^/home/(.*)$ /home/index.php?q=$1 [L,QSA]
Run Code Online (Sandbox Code Playgroud)

根据一些文档,我知道我们可以创建一个undertow-handlers.conf到我的ROOT.war/WEB-INF /文件夹,和

如何将上面的regex []格式放在'undertow-handlers.conf'中

试过这个

regex['/home/(.*)$'] -> rewrite['/home/index.php']

似乎网址正确加载并重定向到主页.但应用程序会遇到重定向循环错误.我指的是这个这个文档.看来我们可以配置http连接器以防止重定向循环,如下所示:

<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" proxy-name="${env.OPENSHIFT_GEAR_DNS}" proxy-port="443" secure="true"/>
Run Code Online (Sandbox Code Playgroud)

但我不知道如何在WildFly 8中配置它.其次,如果这个问题是由于在'undertow-handlers.conf'中新的正则表达式中缺少RewriteCond?

ERROR:
[io.undertow.request] (default task-20) UT005023: Exception handling request to /home/index.php?q=: com.caucho.quercus.QuercusModuleException: java.io.IOException: 
Run Code Online (Sandbox Code Playgroud)

远程主机强制关闭现有连接

请帮我解决这个问题.

我的web.xml:

<servlet-mapping>
   <servlet-name>Quercus Servlet</servlet-name>
   <url-pattern>*.php</url-pattern>
 </servlet-mapping>

 <welcome-file-list>
   <welcome-file>index.php</welcome-file>
 </welcome-file-list>
Run Code Online (Sandbox Code Playgroud)

Gra*_*per 4

相当于重写条件的下流是:

regex['/home/(.*)$'] -> rewrite['/home/index.php?q=${1}']
Run Code Online (Sandbox Code Playgroud)

我很确定该异常与正则表达式本身无关。