1

I've setup wiki.example.com (on the remote web server, accessible to the world) to redirect with 301 .htaccess to 192.168.1.x/cgi-bin/foswiki/view (on internal server, accessible only via the LAN).

Is there any way, either on the local or remote, that I can mask the local IP?

So the user would see

wiki.example.com

in their address bar, and not

192.168.1.x/cgi-bin/foswiki/view

Both are linux servers running Apache2

In response to the questions below: @Zoredache - we don't have an internal DNS server, so the fqdn doesn't get reliably resolved. I might have something wrong in the setup. You can use netbios names for the windows machines on the network just fine, but the linux machines don't respond 90% of the time.

@Dennis - Below is the current .htaccess on our remote web server

redirectMatch 301 ^(.*)$ http://192.168.1.x/foswiki 
redirectMatch permanent ^(.*)$ http://192.168.1.x/foswiki

Maybe I'm not going upon this the right way. Setting up an internal DNS Server is not an option at this time.

shaiss
  • 337
  • 2
  • 6
  • 20

1 Answers1

1

Untested:

RewriteEngine  on
RewriteRule    ^/?(.*)  http://192.168.1.x/cgi-bin/foswiki/$1

By not using the "[R]" it should leave the URL alone in the browser's address bar.

Dennis Williamson
  • 60,515
  • 14
  • 113
  • 148
  • I think it will always redirect if you have http[s]:// in the redirect URL. – Josh Sep 22 '09 at 02:13
  • That worked to redirect, however, the URL in the address bar does change to reflect the inter 192.168.1.x IP #. Any other ideas? – shaiss Sep 22 '09 at 15:40
  • hmm, something must have changed serverside, that worked before, now example.com/wiki takes me to http://192.168.1.x/cgi-bin/foswiki/home/csts/public_html/wiki. Looks like something changed on the server side that the $1 variable is getting passed wrong – shaiss Sep 29 '09 at 00:53