Click here to get back home

Redirecting all users except 1

 HomeNewsGroups | Search | About
 alt.www.webmaster    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Redirecting all users except 1 Brian S. Paskin 08-14-2006
Get Chitika Premium
Posted by Brian S. Paskin on August 14, 2006, 4:06 pm
Please log in for more thread options


Hi, I am trying to figure out a way to redirect all users, except the
ip address I am working on, to update the site.

I have been trying different combos in the .htaccess (Apache) without
coming up with a solution.

Any ideas would be great!

Thanks,
Brian


Posted by Brian Wakem on August 14, 2006, 4:30 pm
Please log in for more thread options


Brian S. Paskin wrote:

> Hi, I am trying to figure out a way to redirect all users, except the
> ip address I am working on, to update the site.
>
> I have been trying different combos in the .htaccess (Apache) without
> coming up with a solution.
>
> Any ideas would be great!


Try something like:

RewriteCond % !^xxx\.xxx\.xxx\.xxx$
RewriteRule ^.*$ /redir.html [R,L]


--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png

Posted by Rik on August 14, 2006, 4:38 pm
Please log in for more thread options


Brian Wakem wrote:
> Brian S. Paskin wrote:
>
>> Hi, I am trying to figure out a way to redirect all users, except the
>> ip address I am working on, to update the site.
>>
>> I have been trying different combos in the .htaccess (Apache) without
>> coming up with a solution.
>>
>> Any ideas would be great!
>
>
> Try something like:
>
> RewriteCond % !^xxx\.xxx\.xxx\.xxx$
> RewriteRule ^.*$ /redir.html [R,L]

Ah, I was looking wether or not that ! would be supported, but I couldn't
find it that fast on http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html.
Nice to know.

Grtz,
--
Rik Wasmus



Posted by Rik on August 14, 2006, 4:34 pm
Please log in for more thread options


Brian S. Paskin wrote:
> Hi, I am trying to figure out a way to redirect all users, except the
> ip address I am working on, to update the site.
>
> I have been trying different combos in the .htaccess (Apache) without
> coming up with a solution.

Does this work (untested)?

RewriteCond % ^123\.255\.255\.255$
RewriteRule ^(.*?)$ $1 [L]

RewriteRule ^(.*?)$ temp/$1 [R]

Grtz,
--
Rik Wasmus



Posted by Brian S. Paskin on August 14, 2006, 8:10 pm
Please log in for more thread options


Thanks to everyone who wrote back. I decided to place some code in PHP
to handle this. It is not the best solution, but it is a solution that
works. I will continue to try some things with mod_rewrite.

Thanks,
Brian


Similar ThreadsPosted
Bandwidth vs. Users - 8.5mbit/s How Many Users? October 31, 2007, 12:07 am
Redirecting URL March 8, 2006, 10:58 pm
Redirecting from CJB March 26, 2006, 2:25 am
Redirecting old IP to new IP August 30, 2006, 1:03 am
redirecting to more than one site May 16, 2006, 6:15 am
Stealth redirecting with no ads? October 8, 2006, 11:52 am
.htaccess advanced redirecting help May 31, 2006, 5:30 pm
.htaccess advanced redirecting help May 31, 2006, 5:32 pm
,htaccess redirecting all subdomains May 31, 2006, 6:17 pm
Help, site redirecting strangely? December 30, 2006, 3:12 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap