Jump to content

htaccess Knowledgebase


hostingames

Recommended Posts

hi,

of that add the config on the .htaccess file happens more aler on knowledgebase.php ca blocks I need it or you have another solution for the protection I thank you premeur

 

the config with the site itself works well

 

RewriteEngine On



# Announcements

RewriteRule ^announcements/([0-9]+)/[a-z0-9_-]+\.html$ ./announcements.php?id=$1 [L,NC]

RewriteRule ^announcements$ ./announcements.php [L,NC]



# Downloads

RewriteRule ^downloads/([0-9]+)/([^/]*)$ ./downloads.php?action=displaycat&catid=$1 [L,NC]

RewriteRule ^downloads$ ./downloads.php [L,NC]



# Knowledgebase

RewriteRule ^knowledgebase/([0-9]+)/[a-z0-9_-]+\.html$ ./knowledgebase.php?action=displayarticle&id=$1 [L,NC]

RewriteRule ^knowledgebase/([0-9]+)/([^/]*)$ ./knowledgebase.php?action=displaycat&catid=$1 [L,NC]

RewriteRule ^knowledgebase$ ./knowledgebase.php [L,NC]





# robot et sitemap

RewriteRule ^robots.txt index.php?m=whmcs_seo&action=robots

RewriteRule ^sitemap.xml index.php?m=simple_sitemap



# redirection escroc

RewriteCond %{REMOTE_ADDR} ^41\.[0-9]+\.[0-9]+\.[0-9]+ [OR]

RewriteCond %{REMOTE_ADDR} ^81\.[0-9]+\.[0-9]+\.[0-9]+ [OR]

RewriteCond %{REMOTE_ADDR} ^196\.[0-9]+\.[0-9]+\.[0-9]+

# RewriteRule .*    http://www.ambafrance-ci.org/spip.php?article350

RewriteCond %{REMOTE_ADDR} !^(66\.249\.65.\202|207\.46\.13\.46|66\.249\.71\.237|67\.195\.112\.122|67\.195\.111\.170)$



# Geo redirection escroc

RewriteCond %{ENV:GEOIP_COUNTRY_CODE} ^SN|NE|NG|CG|DE|CI|BJ|RU|CN|RU|EN|US|CA|$

RewriteRule .* - [F]



SetEnvIf GEOIP_COUNTRY_CODE ^SN|NE|NG|CG|DE|CI|BJ|RU|CN|RU|EN|US|CA $ FORBIDDEN=1



RewriteCond %{HTTP:VIA}                 !^$ [OR]

RewriteCond %{HTTP:FORWARDED}           !^$ [OR]

RewriteCond %{HTTP:USERAGENT_VIA}       !^$ [OR]

RewriteCond %{HTTP:X_FORWARDED_FOR}     !^$ [OR]

RewriteCond %{HTTP:PROXY_CONNECTION}    !^$ [OR]

RewriteCond %{HTTP:XPROXY_CONNECTION}   !^$ [OR]

RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]

RewriteCond %{HTTP:XROXY_CONNECTION}    !^$ [OR]

RewriteCond %{HTTP:X-FORWARDED-FOR}     !^$ [OR]

RewriteCond %{HTTP:HTTP_CLIENT_IP}      !^$ [OR]

RewriteCond %{HTTP:FORWARDED-FOR}       !^$ [OR]

RewriteCond %{HTTP:X-FORWARDED}         !^$

RewriteCond %{HTTP_REFERER}             !(.*)proxy-01.com(.*)

RewriteCond %{HTTP_REFERER}             !(.*)proxy-02.net(.*)

RewriteCond %{HTTP_REFERER}             !(.*)proxy-03.fr(.*)

RewriteRule ^(.*)$ - [F]



Order Deny,Allow

# Google

Allow from 66.249.65.202

Allow from 66.249.71.237

# Yahoo

Allow from 67.195.112.122

Allow from 67.195.111.170

# MSN

Allow from 207.46.13.46

Deny from env=FORBIDDEN

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated