Using htacess to restrice access to squeeze pages?? a Question?

3 replies
Hello, I would like to know if what I'm looking for is even possible. I am needing the htaccess file to act as a filter. I would like it to only allow access to people based on there location. Via the I.P. address. As for the people I want to restrict access to, I would like it to redirect them to another page of my choice.

However, here is my problem, I am wanting this access/restriction only for my squeeze pages. I hope I'm making some type of sense. Here is why I need this. I would like to further target and filter my traffic to countries that are more likely to buy and more targeted to the people I want on my list. I feel like this will help in such traffic sources like solo ads.

I will be using the htaccess file as a filter to block unwanted traffic from certain countries, and allow access to countries of my choice. And for the unwanted traffic, send them to another page via a redirect.

is this possible?? :confused:

What I'm looking for (if possible) is for the htaccess file to automatically detect the site visitors IP address and block them from gaining access to the squeeze page from countries that I've preselected. And allow access to the site from countries that I've also preselected.

So for example:
I want the htaccess to say, ok everybody from the USA, Canada and Australia can access the page, but NOBODY from India, China and Pakistan can access the page, they must be redirected to this page instead.

And I want it to automatically detect there IP address of filter out the traffic accordingly.

I found this: Block Visitors by Country |

It can create the htaccess and block the site visitors from reaching my site. However, I only want it to be used on certain pages, within my blog. The pages I will be using this htaccess file on are unique pages within my blog.

For example:
I want to place the htaccess file on this URL:

...and ONLY have the attributes of the htaccess file apply to that single page. And NOT have it effect the rest of the blog.

#access #htacess #pages #question #restrice #squeeze
  • Profile picture of the author OnlineAddict
    Yes, it can be done. You can google htaccess and deny/allow options, but if I was you, I would hire someone on fiverr to make the whole htaccess file for you with your specifications.

    {{ DiscussionBoard.errors[8849694].message }}
  • Profile picture of the author jkujami
    use MyIPBlocker - IP BLOCKER | COUNTRY BLOCKER and configure as many pages as you want and redirect it to wherever you want.

    they use ip2location db .
    {{ DiscussionBoard.errors[8915523].message }}
  • Profile picture of the author yakim1
    One thing you can do to differentiate your squeeze pages from your other pages is the extension used. For squeeze pages use the extension .htm and for your other pages use the extension .html

    Then when you have your .htaccess file written it will know by the extension which are your squeeze pages.

    I do this to differentiate between database pages and folder pages. but my htaccess file keeps html pages out of the folders. It will not show the html pages.

    That is why I believe this format will help in your project.
    {{ DiscussionBoard.errors[8920262].message }}

Trending Topics