@denisov_nsk

Не работает сайт из за .htaccess, пишет ошибка 500 что нужно сделать чтоб он заработал?

вот мой .htaccess
DirectoryIndex index.php


RewriteEngine On

# Optimize deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html

# Options +FollowSymLinks


# Accses in folder
Options All -Indexes


# Loading Errors
ErrorDocument 401 /error/401.php
ErrorDocument 403 /error/403.php
ErrorDocument 404 /error/404.php
ErrorDocument 500 /error/500.php
# Optimize deflate - немного ускоряем работу скрипта.
# Accses in folder - Запрещаем вывод каталога папок, как я видел у некоторых доступно по адресу http://mysiti.com/templates/Default/ - каталог как на ладони.
# Loading Errors - выводим собственно свою ошибку..

# Виджеты
    RewriteRule ^dev/widget_comm(/?)+$ index.php?go=dev_wid&act=widget_comm [L]

# Отключаем вывод ошибок пользователям
	php_flag display_errors off



	
#robots.txt
    RewriteCond %{HTTP_USER_AGENT} !^yandex.* [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} !^googlebot.* [NC,OR]
    RewriteCond %{HTTP_USER_AGENT} !^rambler.* [NC,OR]
    RewriteRule ^robots\.txt$ / [L,R]	

# Регистрация
	RewriteRule ^reg/(/?)+$ index.php?go=register [L]
	
# Отзывы
	RewriteRule ^reviews(/?)+$ index.php?go=reviews [L]
	
# Apps
	RewriteRule ^apps(/?)+$ index.php?go=apps [L]
	RewriteRule ^app([0-9]+)(/?)$ index.php?go=apps&act=app&id=$1 [L]
	RewriteRule ^apps(/?)+$ /index.php?go=apps&act=search [L]
	RewriteRule ^apps(/?)+$ /index.php?go=apps&act=view [L]
	RewriteRule ^apps(/?)+$ /index.php?go=apps&act=mydel [L] 
	RewriteRule ^apps(/?)+$ /index.php?go=apps&act=install [L]

	RewriteRule ^editapp/create(/?)+$ /index.php?go=editapp&act=create&id=$1 [L]
	RewriteRule ^editapp/info_([0-9]+)(/?)+$ /index.php?go=editapp&act=info&id=$1 [L]
	RewriteRule ^editapp/options_([0-9]+)(/?)+$ /index.php?go=editapp&act=options&id=$1 [L]
	RewriteRule ^editapp/payments_([0-9]+)(/?)+$ /index.php?go=editapp&act=payments&id=$1 [L]
	RewriteRule ^editapp/admins_([0-9]+)(/?)+$ /index.php?go=editapp&act=admins&id=$1 [L]
	
# Баги
	RewriteCond %{QUERY_STRING} ^act=([a-z]+)
	RewriteRule ^(.*)bugs $1index.php?go=bugs [QSA,L]	
	RewriteCond %{QUERY_STRING} ^id=([0-9]+)
	RewriteRule ^(.*)bugs $1index.php?go=bugs [QSA,L]
	RewriteRule ^bugs(/?)+$ index.php?go=bugs [L]
	
# API
    RewriteRule ^method/messages.get method/messages.get.php [L]
    RewriteRule ^method/messages.set method/messages.set.php [L]
    RewriteRule ^api(/?)+$ method/messages.set method/messages.set.php [L]

	
# Разработчикам
    RewriteRule ^dev(/?)+$ index.php?go=developers [L]
	RewriteRule ^dev/met(/?)+$ index.php?go=met [L]
	RewriteRule ^dev/native(/?)+$ index.php?go=native [L]
	RewriteRule ^dev/tt(/?)+$ index.php?go=tt [L]
	RewriteRule ^dev/standalone(/?)+$ index.php?go=standalone [L]
	RewriteRule ^dev/sites(/?)+$ index.php?go=sites [L]
	RewriteRule ^dev/rules(/?)+$ index.php?go=rules [L]
	
# Статистика страницы пользователя
	RewriteRule ^my_stats(/?)+$ index.php?go=my_stats [L]
	
# Страница юзера
	RewriteRule ^u([0-9]+)(/?)+$ index.php?go=profile&id=$1 [L]
	RewriteRule ^u([0-9]+)after(/?)+$ index.php?go=profile&id=$1&after=1 [L]
	
# Редактирование страницы
	RewriteRule ^editmypage(/?)+$ index.php?go=editprofile [L]
	RewriteRule ^editmypage/contact(/?)+$ index.php?go=editprofile&act=contact [L]
	RewriteRule ^editmypage/interests(/?)+$ index.php?go=editprofile&act=interests [L]
	RewriteRule ^editmypage/all(/?)+$ index.php?go=editprofile&act=all [L]
  • Вопрос задан
  • 808 просмотров
Пригласить эксперта
Ответы на вопрос 2
@IceJOKER
Web/Android developer
Знаете как я поступаю в таких ситуациях? Когда не знаю где ошибка и нет подсказок

Делю код на несколько частей, поочередно удаляю один за другим и смотрю работает или нет, до тех пор пока не заработает, а потом уже работаю над последней удаленною частью, все очень просто, Ватсон
Ответ написан
Комментировать
@inkvizitor68sl
Linux-сисадмин с 8 летним стажем.
в /var/log/apache2/error.log смотрите, там будет указана, какая именно из директив htacces на этом сервере не работает.
Скорее всего нужно a2enmod rewrite или a2enmod filter
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы