2013-01-09 80 views
0

我试图通过使用mod_jk将我的webapp的任何请求传递给tomcat容器,当请求.jsp和静态文件时,一切都很好,但我使用.htaccess文件来制作友好的URL ,这是不工作的某些原因与当前的配置,这是vhost.conf我有:JKMount没有拿起.htacess

DirectoryIndex index.jsp index.htm index.html index.php 

<IfModule mod_jk.c> 
    JkMount/ajp13 
    JkMount /* ajp13 
</IfModule> 

RewriteLog /etc/httpd/logs/rewrite.log 
RewriteLogLevel 3 

DocumentRoot /usr/share/tomcat6/psa-webapps/localkicks.com 
<Directory /usr/share/tomcat6/psa-webapps/localkicks.com> 
    Options Indexes FollowSymLinks 
    AllowOverride All 
    Order allow,deny 
    Allow from all 
</Directory> 

一个基本的重写规则:

RewriteEngine on 
RewriteRule ^/?editorial_search$ news_search_result.jsp [L] 

为什么会这样发生?

+0

¿是如何传入的URL在你的问题重写规则? –

+0

类似http://www.localkicks.com/editorial_search –

回答

0

这可能会实现,而不是您的规则:

RewriteEngine On 
RewriteRule ^editorial_search/? news_search_result.jsp  [L] 
+0

仍然没有运气,即使是一个简单的Redirect /yehia.html http://cairocubicles.com/web/在.htaccess中不起作用 –

+0

@Yehia规则将像在你的第一条评论中提到的那样,在URL中有'editorial_search'这样的'localkicks.com/editorial_search'工作。但是,根据你最后的评论,显然你输入了其他URL。请给出一些输入URL和映射URL的完整示例(资源是:PHP,JSP或其他)Mod_rewrite实际上是多功能的,可以执行许多转换,但有必要首先明确您想要的内容。 –

0

您可以使用JkUnMount。即使如此,您仍然可能遇到与JSESSIONID有关的问题。尝试启用Cookie。

JkUnMount/AJP13 JkMount/* AJP13