Welcome to WebmasterWorld Guest from 126.96.36.199
I can add a script in PHP to redirect or block access to a site based on country code supplied by the database, but there are a lot of pages in the site to apply the script to!
Is there an easier way to simply redirect a user based on country code by using .htaccess?
Perhaps your needs will be met by using PHP's "auto-prepend" function to automatically include the call to your lookup script on all of your php pages. See [webmasterworld.com...]
I'm a fish out of water here, I know next to nothing about how servers work.
I had a look at the thread you suggested begun by mvl22, but I can't say I understand much.
As it is now I can simply call the script up with an "include" command in each of the (very many) files. If I understand correctly then there is a way to configure the server to automatically attach this script either before or after the rest of the files. In layman's terms, what do I need to do and where do I need to do it to avoid manually placing "include" on every file?
I asked the tech guy who takes care of the server to set it so it would parse .html files looking for php code (otherwise I'd have to rename the files and would thus compromise all the SEO work done).
Would using "auto-prepend" in this case work for the .html files as well?