Reply to htaccess alternative

Your name:

Reply:


Posted by (Joseph on 06/15/06 06:38

Is there a way to use php as an alternative to htaccess to control access to
my wordpress blog. There are several text files (eg one.txt, 1.txt,
first.txt) on my websites that have approved ip addresses.

The php script would compare the ip address of the user who came to my
website with those in the text files. If there is not a match, the user
gets redirected to www.yahoo.com

If there is a match, the rest of the php script would run and hence the blog
would be displayed.

The thought was to put this piece of code at the top of the main php script
used by wordpress so that everytime someone goes to a wordpress blog page,
this piece of php code would execute to verify that the IP address is
approved.

I do know that IP addresses change, but most of the surfers who have access
to my blog have static ip addresses. I'm sure this will also slow down the
site, but the IP lists are not large.

Thank you in advance for any assistance you can provide.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация