开发者

htaccess only for some pages

开发者 https://www.devze.com 2023-02-15 03:55 出处:网络
Hi I use apache geo-ip and I want to allow users from other countries only to pages such as: [http:]//[www.]my_domain/forum/

Hi I use apache geo-ip and I want to allow users from other countries only to pages such as:

[http:]//[www.]my_domain/forum/

[http:]//[www.]my_domain/forum/viewforum.php?f开发者_StackOverflow社区=

[http:]//[www.]my_domain/forum/viewtopic.php?f=

It is possible with htaccess?

thanks


Solved here:

SetEnvIf GEOIP_COUNTRY_CODE RO AllowCountry

<FilesMatch "^ucp.php|posting.php|memberlist.php">

    Order Deny,Allow

        Deny from all

Allow from env=AllowCountry

Allow from localhost

ErrorDocument 403 /errors/500.php

</FilesMatch>
0

精彩评论

暂无评论...
验证码 换一张
取 消