Ошибка 500 - как устранить?
Ошибка 500 - как устранить?
Ошибка сервера: .htaccess: Invalid command 'Header', perhaps mis-spelled or defined by a module not included in the server configuration
Служба поддержки, помочь решить проблему не хотят и пишут: Данная ошибка по причине того, что веб-сервер не может обработать директивы указанные в файле .htaccess. С полным текстом ошибки можно ознакомиться в панели управления хостингом, раздел "Веб-сервер" - "Сайты" - "имя_сайта" - "Файлы протоколов".
Обращаем Ваше внимание на то, что на сервере используется apache версии 1.3.
Я не ярый программист, но немного разбираюсь в коде.
Помогите исправить ошибку и подскажите, что и где нужно исправить?
Заранее благодарен за ответ!
Что именно нужно изменить и в каких файлах, я так, к сожалению и не понял. Можно по подробнее?
AddDefaultCharset utf-8
# PHP options.
php_flag magic_quotes_gpc off
php_flag register_globals on
php_flag display_errors on
php_value register_globals 0
php_value magic_quotes_gpc 0
php_value magic_quotes_runtime off
php_value safe_mode off
#php_value safe_mode_gid off
#php_value safe_mode_include_dir off
#php_value log_errors off
php_value session.auto_start 1
php_value session.use_cookies on
php_value session.name SID
php_value session.cookie_lifetime 0
#php_value session.cookie_domain ".sss.ru"
#php_value date.timezone Europe/Moscow
# Lock site to reconstuction.
#DirectoryIndex site_lock_to_reconstruction.php
# PHP 5, Apache 1 and 2.
php_flag magic_quotes_gpc off
php_flag magic_quotes_sybase off
php_flag register_globals off
php_flag session.auto_start off
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_flag mbstring.encoding_translation off
# Set the default handler.
DirectoryIndex index.php index.html index.htm
# Follow symbolic links in this directory.
Options +FollowSymLinks
Options +SymLinksIfOwnerMatch
# Don't show directory listings for URLs which map to a directory.
# Options -Indexes
# Limit memory for using by PHP.
php_value memory_limit 128M
# Protect files and directories from prying eyes.
Order allow,deny
# Requires mod_expires to be enabled.
# Set an Expires header and enable Cache-Control.
# Enable expirations.
ExpiresActive On
# Cache all files for 2 weeks after access (A).
ExpiresDefault A1209600
# cache for 1 year
Header set Cache-Control "max-age=31449600, public"
# cache for 2 days
Header set Cache-Control "max-age=7200, must-revalidate"
# Do not allow PHP scripts to be cached unless they explicitly send cache
# headers themselves. Otherwise all scripts would have to overwrite the
# headers set by mod_expires if they want another caching behavior. This may
# fail if an error occurs early in the bootstrap process, and it may cause
# problems if a non-Drupal PHP file is installed in a subdirectory.
ExpiresActive Off
# Various rewrite rules.
RewriteEngine on
# Rules to correctly serve gzip compressed CSS and JS files.
# Requires both mod_rewrite and mod_headers to be enabled.
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
# Serve gzip compressed JS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
# Serve correct content types, and prevent mod_deflate double gzip.
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]
# Serve correct encoding type.
Header set Content-Encoding gzip
# Force proxies to cache gzipped & non-gzipped css/js files separately.
Header append Vary Accept-Encoding
# SEF URL (search engines friendly url).
RewriteRule ^page/([\d\w]+).html shop/pages.php?name=$1 [L,R=301]
RewriteRule ^feed/([\d\w-]+).html shop/news.php?id=$1 [L,R=301]
RewriteRule ^article/([\d\w-]+).html shop/articles.php?id=$1 [L,R=301]
RewriteRule ^detail_tire/([\d]+).html shop/details_tires.php?id=$1&catalog=tires [L,R=301]
RewriteRule ^detail_wheel/([\d]+).html shop/details_wheels.php?id=$1&catalog=wheels [L,R=301]
RewriteRule ^detail_battery/([\d]+).html shop/details_batteries.php?id=$1&catalog=batteries [L,R=301]
RewriteRule ^detail_misc/([\d]+).html shop/details_misc.php?id=$1&catalog=misc [L,R=301]
RewriteRule ^detail_parts/([\d]+).html shop/details_parts.php?id=$1&catalog=parts [L,R=301]
# Deny access to evil robots site rippers offline browsers and other nasty scum.
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^PHP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Anarchie [OR]
RewriteCond %{HTTP_USER_AGENT} ^ASPSeek [OR]
RewriteCond %{HTTP_USER_AGENT} ^attach [OR]
RewriteCond %{HTTP_USER_AGENT} ^autoemailspider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xenu [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
RewriteRule ^.* - [F,L]