I just used your UrlRwriteFilter tool and this works good when I use
it in a environment without virtual hosts.
For example:
http://localhost:8080/SiteName/test/something is perfectly redirected
to /bin/test.jsp?ID=something when I use this rule:
<rule enabled="true">
<from>^/test/([a-z]+)</from>
<to>/bin/test.jsp?test=$1</to>
</rule>
But when I want to use this in an environment with a virtual host
(like http://www.mydomain.com/test/something instead of
http://localhost:8080/SiteName/test/something) I got a 404 error and
the whole url rewrite doesn't work anymore.
Maybe you know what I'm doing wrong or where I should take a look/make
changes to get this working with virtual hosts?
Thanks in advance!
Regards,
Arjan Snaterse
- what application server are you using?
- what is "doing" the virtual hosting (the app server or is there an
apache in-front of it)?
- how is the virtual hosting configured?
- what is the 404 for? (ie, what appears in your log as the not found resource)
Cheers,
Paul.
<Host name="host_name">
<Alias>www.mydomain.com</Alias>
<Valve className="org.apache.catalina.valves.AccessLogValve"
prefix="mydomain" suffix=".log" pattern="common" directory="$
{jboss.server.home.dir}/log"/>
<DefaultContext cookies="true" crossContext="true" override="true"/>
</Host>
- And this is what I get with the 404 error (when I go to www.mydomain.com):
HTTP Status 404 - /
type: Status report
message: /
description: The requested resource (/) is not available.
On May 2, 10:47 pm, "Paul Tuckey" <p...@tuckey.org> wrote:
> In order to even get close to investigating this problem I need to
> know the following:
>
> - what application server are you using?
> - what is "doing" the virtual hosting (the app server or is there an
> apache in-front of it)?
> - how is the virtual hosting configured?
> - what is the 404 for? (ie, what appears in your log as the not found resource)
>
> Cheers,
> Paul.
>
> On 5/3/07, acsnaterse <snate...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > I just used your UrlRwriteFilter tool and this works good when I use
> > it in a environment without virtual hosts.
>
> > For example:
> >http://localhost:8080/SiteName/test/somethingis perfectly redirected
> > to /bin/test.jsp?ID=something when I use this rule:
>
> > <rule enabled="true">
> > <from>^/test/([a-z]+)</from>
> > <to>/bin/test.jsp?test=$1</to>
> > </rule>
>
> > But when I want to use this in an environment with a virtual host
> > (likehttp://www.mydomain.com/test/somethinginstead of
On 5/3/07, acsnaterse <snat...@gmail.com> wrote:
>
INFO: 2007-05-03 15:43:10,531[main::STDOUT]: Unable to load the
library: java.lang.UnsatisfiedLinkError: no HL_Wrapper_CS in
java.library.path
On May 3, 9:21 am, "Paul Tuckey" <p...@tuckey.org> wrote:
> What log output do you get when you set urlrewritefilter to log at debug level?
>
> > > >http://localhost:8080/SiteName/test/somethingisperfectly redirected
try setting log level to this...
<init-param>
<param-name>logLevel</param-name>
<param-value>sysout:DEBUG</param-value>
</init-param>
ERROR:[org.jboss.web.localhost.Engine]: StandardContext[]Exception
starting filter UrlRewriteFilter
java.lang.ClassNotFoundException:
org.tuckey.web.filters.urlrewrite.UrlRewriteFilter
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1340)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1189)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:
211)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:
308)
at
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:
79)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:
3698)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:
4349)
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:
3043)
at
org.apache.catalina.startup.HostConfig.restartContext(HostConfig.java:
873)
at
org.apache.catalina.startup.HostConfig.checkContextLastModified(HostConfig.java:
759)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1085)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:
327)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:
119)
at
org.apache.catalina.core.StandardHost.backgroundProcess(StandardHost.java:
800)
at org.apache.catalina.core.ContainerBase
$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1619)
at org.apache.catalina.core.ContainerBase
$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1628)
at org.apache.catalina.core.ContainerBase
$ContainerBackgroundProcessor.run(ContainerBase.java:1608)
at java.lang.Thread.run(Thread.java:595)
ERROR:[tomcat.appName.ROOT.Context]: Error filterStart
ERROR:[tomcat.appName.ROOT.Context]: Context startup failed due to
previous errors
So, it seems that it cannot find the UrlRewriteFilter class, but the
jar file (urlrewrite-2.6.0.jar) is in the lib directory. What am I
doing wrong?
On May 8, 12:38 pm, "Paul Tuckey" <p...@tuckey.org> wrote:
> I don't think this has anything to do with UrlRewriteFilter...
>
> try setting log level to this...
>
> <init-param>
> <param-name>logLevel</param-name>
> <param-value>sysout:DEBUG</param-value>
> </init-param>
>