IP triggered script

mousebert asked 3 years ago


I am going to set up a blog on a traditional blog site such as WordPress, and I would like to have a script that does a conditional branch based on the incoming IP address - to present a different or personal greeting. Of course I will have to know the IP and have them in a look-up-table, but that is not the problem, since I intend to do that on the fly, so to speak.

My problem is that while I have solid, but ancient, programming background, I don't have any experience with web scripts. So I need a script. Please recommend beginners guides/books to write scripts that will cover this or a site with them pre-made. (No point in reinventing the wheel.) I intend to use Adobe DreamWeaver (on a Mac), so pointers using it would be appreciated.


1 Answers
wimiadmin Staff answered 3 years ago

I would recommend doing this in the .htaccess if you have access to that file.

You can create redirect rules in the .htaccess based on a number of variables including the IP addresses.

When you say 'personal message', do you mean Welcome so and so from city/country or do you mean Welcome user it's great to have you back?

Know the answer? Login or sign up for an account to answer this question.
Sign Up