You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Malka Cymbalista <Ma...@weizmann.ac.il> on 2004/02/18 15:00:50 UTC
[users@httpd] RewriteRule problem
I have a strange problem with my web server. I am running apache 2.0.48
with mod_perl 1.99_12 on a Sun Solaris machine running Solaris 9. The
URL for our site is http://www.weizmann.ac.il. When someone goes to
http://www.weizmann.ac.il, the appropriate page is served up
depending on the IP address of the machine requesting the page so that
people inside
Weizmann get one page and people outside Weizmann get a different
page.
I have the following code in my httpd.conf file:
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{REMOTE_ADDR} !^138\.76.+
RewriteCond %{REMOTE_ADDR} !^138\.77.+
RewriteRule ^/$ http://www.weizmann.ac.il/homep/home_ex.html [L]
RewriteCond %{REQUEST_URI} ^/$
RewriteCond %{REMOTE_ADDR} ^138\.76.+|^138\.77.+
RewriteRule ^/$ http://www.weizmann.ac.il/homep/home_in.html [L]
These lines are in the <VirtualHost> section of the file. The problem
is that when someone inside Weizmann goes to http://www.weizmann.ac.il,
they get the appropriate page but the URL that is displayed in the
location bar is http://www.weizmann.ac.il/homep/home_in.html and what I
want displayed is simply http://www.weizmann.ac.il. The odd thing is
that if someone from outside Weizmann goes to http://www.weizmann.ac.il
they will get the proper page but they will see
http://www.weizmann.ac.il displayed in the location bar and this is
what I want. I just upgraded to a new server and on the old server
everything worked properly. I also have another web server that runs
inside our firewall and on this server everything works properly as
well. The code in both httpd.conf files is the same.
I would appreciate it if anyone can shed any light on this problem.
Thanks in advance.
Malki Cymbalista
Webmaster, Weizmann Institute of Science
Rehovot, Israel 76100
Internet: Malki.Cymbalista@weizmann.ac.il
08-934-3036
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org