I have the following in my .HTACCESS file:
I'm trying to redirect everyone to my /projects/xcs_wiki location on my server (relative to my Apache root). I have 2 computers in all this: box1 and box2. The WAMP setup (my development environment) is on box1 but I do unauthenticated / "random visitor" testing from box 2 as it speeds up the whole process...Code:RewriteEngine On RewriteBase / RewriteCond %{REMOTE_HOST} !^127\.0\.0\.1 RewriteCond %{REMOTE_HOST} !^159\.112\.48\.147 RewriteCond %{REMOTE_HOST} !^159\.112\.48\.83 RewriteCond %{REQUEST_URI} !/projects/xcs_wiki$ RewriteRule .* /projects/xcs_wiki [R=302,L]
Anyway, keeping the above .HTACCESS code in mind, everything seems to test perfectly fine when browsing from box2 using Firefox. When I try to browse from box1, however, I get redirected. Why is this?
Does this have something to do with REMOTE_HOST vs. REMOTE_ADDR? Did I get that wrong?
Basically, for me, it's nice being able to browse my directories and if I'm being redirected on box1, I can no longer browse my directories...
Any insight into this is appreciated.



Reply With Quote

for catching your localhost in your {REMOTE_ADDR} sequence. Unfortunately, you're not after {REMOTE_HOST} but {REMOTE_ADDR} to fetch the address of the visiting computer.

Bookmarks