Answer the question
In order to leave comments, you need to log in
The site does not work due to .htaccess, it writes an error 500 what needs to be done to make it work?
here is my .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]
Answer the question
In order to leave comments, you need to log in
Do you know what I do in such situations? When I don’t know where the error is and there are no hints
I divide the code into several parts, one by one I delete one by one and see if it works or not, until it works, and then I work on the last removed part, everything is very simple, Watson
look in /var/log/apache2/error.log, it will indicate which of the htacces directives does not work on this server.
Most likely you need a2enmod rewrite or a2enmod filter
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question