Sid
Sid

Reputation: 491

Rewriting URL with OHS/Apache as front with Portal running on Webcenter

We have our Portal running on Oracle Webcenter 11.1.1.8 and our WLS is fronted with OHS . As we see , the URL to our portal page is formed as http://host:port/webcenter/portal/My-Custom-Portal/Home?. As per out client's requirement , we are not supposed to show "webcenter/portal" in our URL along with the adf params . What we want is URL should be clean as http://My-Custom-Portal/home and that's it.

Now,We are stuck with the URL re writing part as how to hide "webcenter/portal" . I tried editing httpd.conf file inside /config folder by adding this below rule just after where load module command for mod_rewrite.so ends.This below line of code was added as a test to see whether this works or not .

RewriteEngine on RewriteRule .* http://www.google.com

But sadly , this didn't help at all . All the request that here given to proxy host and port with webcenter were working as they were earliar .

Also read about .htaccess file that would hold the re writing rules and should be kept under the root directory . But we deploy our code as war to Weblogic , so where should the .htaccess file be kept , if at all that is needed.

What am I missing /doing wrong here .

Kind Regards,

Sid

EDIT : As jonathan suggested following changes were added in httpd.conf file

Virtual host entry:

NameVirtualHost *:7743
<VirtualHost *:7743>
ServerName 10.10.10.10
ServerAlias abc.abc.com
RewriteEngine On
RewriteOptions inherit
RewriteRule ^/mylife$ /webcenter/portal [P]
RewriteLog /tmp/rewrite.log
<Location /webcenter>
  SetHandler weblogic-handler
  WebLogicHost 10.10.10.10
  WebLogicPort 8888
</Location>
</VirtualHost>

After hitting the url as http://10.10.10.10:7743/mylife we are getting the URL as

http://10.10.10.10:7743/mylife;jsessionid=cMDQVLyJ1QH2GqXQgNgs9PPmTmcLLqw7Lt5ctT1dgLBsvDVcBh11!-2127183939?_afrLoop=1892903079007447

in the address bar

with the message in the window as

The requested URL /mylife;jsessionid=cMDQVLyJ1QH2GqXQgNgs9PPmTmcLLqw7Lt5ctT1dgLBsvDVcBh11!-2127183939 was not found.

Are there any more configurations that are needed ?

Upvotes: 0

Views: 3085

Answers (2)

Mahendra
Mahendra

Reputation: 1

Try [R] instead of [p] at the end.

Upvotes: 0

Jonathan Hult
Jonathan Hult

Reputation: 1480

The feature you are looking for is generally known as pretty URLs. There are a few different ways to achieve this.

They usually include some combination of hiding ADF parameters and also proxying/rewriting URLs.

Here are a few other links:

Also, I don't recommend using Google as an example of a proxy/rewrite. Use a lesser technologically savvy website. Google does some things to prevent users from proxying.

Upvotes: 0

Related Questions