Mod_Rewrite Integration with OC4J Fails with HTTP 404 in Version

(Doc ID 468621.1)

Last updated on DECEMBER 05, 2016

Applies to:

Oracle HTTP Server - Version:
This problem can occur on any platform.
Checked for relevance on 13-May-2009


On Application Server versions pre- when attempting to use Rewrite Rules with OC4J mount points from different applications the following error occurs:

HTTP 404 Not Found Resource / not found on this server

The same configuration works correctly under version 10.1.2.X

The issue can be reproduced at will with the following steps:

1. Deploy some application into OC4J having context-root for example /myapp
2. Enable mod_rewrite rules as for example adding at the end of the httpd.conf file to allow access to /prefix/myapp to be mapped with /myapp

RewriteEngine On
RewriteRule ^/+prefix/+myapp(.*)$ /myapp$1 [PT,L]

3. Apply the changes and restart HTTP_Server

4. Try accessing following url's

a) http://host:port/myapp/... , and confirm it works

b) http://host:port/prefix/myapp/... and confirm it fails returning  error
    HTTP 404 Not Found Resource / not found on this server

That prevents using RewriteRule directives on 10.1.3 in combination with OC4J mount points


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms