Forum Moderators: phranque
I want to redirect people from those countries to some other page or just show then access denied page
How can i do this.
Thanks in advance
If instead you are trying to help people get to a more appropriate page for their language, I suppose the next best bet is to look at the http Accept-Language header and rewrite requests accordingly.
If you have language or locale specific pages, I think the best solution is to offer a link to these pages from your home or even all pages on your site so that the choice is the user's. I prefer this solution to that favored by some companies which is to force users to select their location before they get any further.
If you still want to use a list, typically these are implemented as a map -- a set of name-value pairs, such as an IP address or range and a country code. See Apache's RewriteMap directive which provides a way to look in a file like this, look up the name and return the value. You can then use this value to make a RewriteRule that directs the user to the desired place.