I'd like to hide one word in url of web-service. This word related to Oracle ApEx 5.0. I'm using Nginx v1.8.1. My current Nginx-config is:
server {
listen 80;
server_name example.com;
rewrite ^(.*) https://$server_name$1 permanent;
}
server {
listen 443 ssl spdy;
server_name example.com;
.... ssl-confgiguration here....
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
location ~ ^/app$ {
return 301 https://$server_name/apex/f?p=101;
}
So, this config give me the following: when user goes to
http://example.com/app
his request redirected to
https://example.com/apex/f?p=101
Everything is ok, except word "apex" in URL...
Is it possible to create this configuration: user goes to
http://example.com/app
and user can see in browser's address string only
https://example.com/f?p=101
I think, that rewrite-rule is needed, but I tried many configurations without success.