Ich habe meine Website auf Hostgator global gut mit diesem htaccess ausgeführt. Aber als ich meine Seite auf den Hostgator-India-Server verlagerte, fing ich an, zu VIELE REDIRECT-Fehler zu kommen. Können Sie mir helfen, herauszufinden, was mit diesen HTACCESS-Regeln schiefgelaufen ist? Ich bin immer noch Neuling, um HTACCESS-Datei zu verstehen.Zu viele Redirect-Fehler mit htaccess für die Site
Hier sind einige nützliche Teile meiner HTACCESS.
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
#php_flag register_globals on
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^.*(,|:|<|>|">|"<|'|http|%|\\\.\.\\|md5|benchmark|union|select|cast|declare|drop|char|exec|meta|script|chmod|chown|wget|cmd|scp|curl|shell_exec|passthru|system|popen|proc_open).* [NC,OR]
RewriteCond %{REQUEST_URI} ^.*(\=|\@|\[|\]|\^|\`|\{|\}|\~).* [NC,OR]
RewriteCond %{REQUEST_URI} ^.*(\'|%0A|%0D|%27|%3C|%3E|%00).* [NC]
RewriteRule ^(.*)$ - [F,L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^.*(<|>|'|CO518|pRiNcE|mowser|vipguyz|itskool|RWAP.IN|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(HTTrack|clshttp|archiver|loader|email|nikto|miner|python).* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^.*(winhttp|libwww\-perl|curl|wget|harvest|scan|grab|extract).* [NC]
RewriteRule ^(.*)$ - [F,L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} ^.*(localhost|loopback|127\.0\.0\.1).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(,|<|>|"|%0A|%0D|%22|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{QUERY_STRING} ^.*(md5|benchmark|union|select|cast|declare|drop|exec|meta|script|chmod|chown|wget|cmd|scp|curl).* [NC]
RewriteRule ^(.*)$ - [F,L]
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} ^(.*)(<|>|'|%0A|%0D|%27|%3C|%3E|%00).* [NC,OR]
RewriteCond %{HTTP_COOKIE} ^.*(<|>|%0A|%0D|%27|%3C|%3E|%00).* [NC]
RewriteRule ^(.*)$ - [F,L]
</IfModule>
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
<IfModule mod_setenvif.c>
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48
# the above regex won't work. You can use the following
# workaround to get the desired effect:
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
</IfModule>
<IfModule mod_headers.c>
# Make sure proxies don't deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
<IfModule mod_php4.c>
#php_flag zlib.output_compression on
#php_value zlib.output_compression_level 9
</IfModule>
<Limit GET POST>
#The next line modified by DenyIP
order allow,deny
#The next line modified by DenyIP
#deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
<Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</Files>
# Set the default handler.
DirectoryIndex /web/index.php
# Protect files from prying eyes.
<FilesMatch "(\.inc|\.sh|.*sql)$">
Order allow,deny
</FilesMatch>
# disable directory browsing
Options All -Indexes
# secure htaccess file
<Files .htaccess>
order allow,deny
deny from all
</Files>
Bitte entschuldigen Sie mich, wenn ich meine Frage in schlechter Weise gebeten haben. Ich bin neu in all diesen Dingen.
Möglicherweise ein subtiles Syntaxproblem? –