最近在UBUNTU上与MURA和RAILO合作。我在根目录的内部文件夹中安装MURA。
public_html >>网站。
下面的代码添加在.htaccess中,以重写URL以运行没有index.cfm和网站目录的网站。
Options +FollowSymLinks
RewriteEngine On
DirectoryIndex index.cfm
RewriteRule ^$ /website/ [R]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^website/([a-zA-Z0-9/-\s]+)$ /website/index.cfm/$1 [PT]因此,我的url http://example.com/website/privacy/重写为http://example.com/website/index.cfm/privacy/,我认为重写规则应该正确工作,因为我已经尝试了一些在线验证器并给出了正确的结果,但是如果将它运行到MURA,它会产生类似于http://example.com/website/index.cfm/privacy/index.cfm的URL。
我不知道是谁在添加最后一个index.cfm (apache或mura),这每次都会使我增加404页。
请帮帮我..。这让我发疯..。
谢谢,Pritesh
UPDATE我有相同的站点设置,windows/IIS 7位于根用户的子文件夹下,如果这有帮助的话,也可以正常工作
发布于 2013-05-15 10:10:24
谢谢马特和梅尔花时间在这个问题上。最后,找出TOMCAT引起了问题,并在最后添加了index.cfm。
<url-pattern>/website/index.cfm/*</url-pattern>在web.xml文件中添加上面的URL模式,它就可以正常工作了。
发布于 2013-05-13 13:34:03
要删除URL的index.cfm,您必须编辑文件settings.ini.cfm来编辑该文件
Application Rootconfigsiteidinurls和indexfileinurls必须位于0
siteidinurls=0 indexfileinurls=0更改后,您必须通过单击窗口顶部的Reload application菜单上的Settings重新加载应用程序。
https://stackoverflow.com/questions/16522881
复制相似问题