logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Apache 2.2 redirecting page
Author
btip84



Joined: 15 Sep 2015
Posts: 3
Location: Netherlands

PostPosted: Tue 15 Sep '15 14:56    Post subject: Apache 2.2 redirecting page Reply with quote

Hi experts,

I think I have a simple question for you.

We use GlassFish for serving applications like GeoServer. But I want the GeoServer url to redirect to the main site.

For example:
We have a main site http://customer.domain.nl/apex/f?p=100 and there is http://customer.domain.nl/geoserver

I want to redirect http://customer.domain.nl/geoserver to http://customer.domain.nl/apex/f?p=100

This is the rewrite configuration in Apache at the moment:

Code:
RewriteEngine On

RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI}%{QUERY_STRING} /apex/f?p=(.*)
RewriteCond %{REQUEST_URI}%{QUERY_STRING} !/apex/f?p=(bor10:.*)
RewriteCond %{REQUEST_URI}%{QUERY_STRING} !/apex/f?p=(BOR10:.*)
RewriteCond %{REQUEST_URI}%{QUERY_STRING} !/apex/f?p=(100:.*)
#RewriteRule ^(.*)$ balancer://glassfish_node_servers/index.html [R=301,P,QSA]
RewriteRule ^/(.*)$ balancer://glassfish_node_servers/index.html [P,QSA,L]
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Tue 15 Sep '15 16:06    Post subject: Reply with quote

You want a redirect or a rewrite?

a redirect would be

RedirectMatch "^/geoserver/(.*)" "http://customer.domain.nl/apex/f?p=100
&$1"
Back to top
btip84



Joined: 15 Sep 2015
Posts: 3
Location: Netherlands

PostPosted: Wed 16 Sep '15 13:47    Post subject: Reply with quote

Okay thanks, but for the completeness I can't use http://customer.domain.nl for redirect because all the sites make use of the same rewrite configuration file. So it has to be something else I think?
Back to top
btip84



Joined: 15 Sep 2015
Posts: 3
Location: Netherlands

PostPosted: Fri 25 Sep '15 16:18    Post subject: Still help needed... please Reply with quote

I still need a little help here, somebody? Thanks in advance!
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7373
Location: Germany, Next to Hamburg

PostPosted: Wed 07 Oct '15 13:45    Post subject: Reply with quote

btip84 wrote:
Okay thanks, but for the completeness I can't use http://customer.domain.nl for redirect because all the sites make use of the same rewrite configuration file. So it has to be something else I think?


I wonder casue the redirect is only if the directory is geoserver. What is the issue with that config?
Back to top


Reply to topic   Topic: Apache 2.2 redirecting page View previous topic :: View next topic
Post new topic   Forum Index -> Apache