Jump to content

Редактировал файл .htaccess, теперь выдает ошибку Internal Server Error


Recommended Posts

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@********.ru and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.21 Server at ********.ru Port 80

Как захожу на сайт, выдает ошибку, скажите пожалуйста как исправить?

Link to post
Share on other sites

хостер пишет удаляйте файл htaccess, либо исправляйте. Если удалить, то многие страницы не доступны, а исправлять я не знаю как, что именно исправлять???

Link to post
Share on other sites

AddDefaultCharset UTF-8
ErrorDocument 404 /404
ErrorDocument 401 /password.php

RewriteEngine on

# Админка теперь по адресу /simpla
RewriteRule ^admin/?$ simpla [L]


# Каталог товаров
RewriteRule ^catalog/([^/]+)/?$ index.php?module=ProductsView&category=$1 [L,QSA]
RewriteRule ^catalog/([^/]+)/([^/]+)/?$ index.php?module=ProductsView&category=$1&brand=$2 [L,QSA]

RewriteRule ^products/([^/]+)/?$ index.php?module=ProductView&product_url=$1 [L,QSA]
RewriteRule ^products/?$ index.php?module=ProductsView [L,QSA]

RewriteRule ^brands/([^/]+)/?$ index.php?module=ProductsView&brand=$1 [L,QSA]
RewriteRule ^brands/([^/]+)/page_([^/]+)/?$ index.php?module=ProductsView&brand=$1&page=$2 [L,QSA]

# Поиск товаров
RewriteRule ^search/([^/]+)/?$ index.php?module=ProductsView&keyword=$1 [L,QSA]
RewriteRule ^search/?$ index.php?module=ProductsView [L,QSA]

# Блог
RewriteRule ^blog/([^/]+)/?$ index.php?module=BlogView&url=$1 [L,QSA]
RewriteRule ^blog/?$ index.php?module=BlogView [L,QSA]

# Корзина и заказы
RewriteRule ^cart/?$ index.php?module=CartView [L,QSA]
RewriteRule ^cart/([^/]+)/?$ index.php?module=CartView&add_variant=$1 [L,QSA]
RewriteRule ^cart/remove/([^/]+)/?$ index.php?module=CartView&delete_variant=$1 [L,QSA]
RewriteRule ^order/([^/]+)/?$ index.php?module=OrderView&url=$1 [L,QSA]
RewriteRule ^order/?$ index.php?module=OrderView [L,QSA]

# Для пользователей
RewriteRule ^user/login/?$ index.php?module=LoginView [L,QSA]
RewriteRule ^user/register/?$ index.php?module=RegisterView [L,QSA]
RewriteRule ^user/logout/?$ index.php?module=LoginView&action=logout [L,QSA]
RewriteRule ^user/password_remind/?$ index.php?module=LoginView&action=password_remind [L,QSA]
RewriteRule ^user/password_remind/([0-9a-z]+)/?$ index.php?module=LoginView&action=password_remind&code=$1 [L,QSA]
RewriteRule ^user/?$ index.php?module=UserView [L,QSA]

# Google sitemap
RewriteRule ^sitemap.xml?$ sitemap.php [L,QSA]

# XML
RewriteRule ^yandex.xml?$ yandex.php [L,QSA]

# feedback
RewriteRule ^contact/?$ index.php?module=FeedbackView [L,QSA]

#downloads
RewriteRule ^order/([^/]+)/([^/]+)/?$ index.php?module=OrderView&url=$1&file=$2 [L,QSA]


# Статические страницы
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]*)/?$ index.php?module=PageView&page_url=$1 [L,QSA]
RewriteRule ^/?$ index.php?module=HitsView&page_url= [L,QSA]

# Ресайз картинок на лету
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^files/products/(.+) resize/resize.php?file=$1&token=%{QUERY_STRING}
#RewriteCond %{THE_REQUEST} ^GET\ (.*)files/products/(.*)\?([A-z0-9]*)
#RewriteRule ^files/products/(.+) resize/resize.php?file=%2&token=%3 [L,NE]

Link to post
Share on other sites

win+apache2 полет нормальный
linux+apache2 полет нормальный
linux+ngnix полет нормальный
у меня все отображает нормально, скинь именно сам файл на емейл или еще как-то, как тебе удобней

Link to post
Share on other sites

Файл отправил тебе в сообщение! При любом редактировании этого файла, на сайте выдает ошибку. Мб там кодировки у меня с хостингом разные или т.п.??

Link to post
Share on other sites
  • 2 months later...

Только что и сам столкнулся с данной проблемой. Помогло сохранение под одной кодировкой UTF-8. Для смены кодировки использовал Notepad2 (работает четко)

Link to post
Share on other sites
  • 2 weeks later...

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.

Loading...
×
×
  • Create New...