WN

WN (https://www.wn.se/forum/index.php)
-   Serversidans teknologier (https://www.wn.se/forum/forumdisplay.php?f=4)
-   -   .htaccess hjälp (https://www.wn.se/forum/showthread.php?t=25784)

DudeRille 2007-12-20 05:23

Använder mig utav oscommerce men vill ha in IP block i .htaccess filen.
Dock så är det ju massa annat i den nu också.

Då jag aldrig ha andvänt .htaccess så måste jag fråga om det bara är klistra in under det?

så här t.e.x. ??

Kod:

# $Id: $
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#  AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

#<IfModule mod_setenvif.c>
# <IfDefine SSL>
#  SetEnvIf User-Agent ".*MSIE.*" \
#      nokeepalive ssl-unclean-shutdown \
#      downgrade-1.0 force-response-1.0
# </IfDefine>
#</IfModule>

# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter

# AcceptPathInfo On

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)

# php_value session.use_trans_sid 0
# php_value register_globals 1

<Limit GET HEAD POST>
order allow,deny
deny from 117.53.40.0/21
deny from 192.160.29.0/24
deny from 202.0.80.0/24
deny from 202.1.32.0/19
deny from 202.1.240.0/20
deny from 202.58.128.0/22
deny from 202.61.0.0/24
deny from 202.95.192.0/20
deny from 202.165.192.0/20
deny from 202.171.240.0/21
deny from 203.83.16.0/21
allow from all
</LIMIT>


coredev 2007-12-20 09:57

Det skall stämma. Du behöver bara skapa filen .htaccess i den aktuella katalogen så hittar Apachen den själv... OM apachen är confad att leta efter .htaccess-filer.


Alla tider är GMT +2. Klockan är nu 19:09.

Programvara från: vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Svensk översättning av: Anders Pettersson