@shiroyashik

Как правильно настроить Apache?

При переходе на /home (и прочее) появляется ошибка о "циклическом перенаправлении на страницу".
htaccess настроен правильно.

.htaccess
Options -Indexes

RewriteEngine on

# Redirect legacy pages
RewriteRule left.html index.php?redir=home [NC,L,QSA]
RewriteRule main.html index.php?redir=home [NC,L,QSA]
RewriteRule devicemac.html index.php?redir=devmac [NC,L,QSA]
RewriteRule ^(['_A-Za-z]+).html index.php?redir=$1 [NC,L,QSA]
RewriteRule ^(map[0-9]*+).php index.php?redir=map [NC,L,QSA]
RewriteRule find_ranges.php index.php?redir=ranges [NC,L,QSA]

# Rewrite for simple URIs
RewriteRule home$ index.php?page=home [NC,L,QSA]
RewriteRule rules$ index.php?page=rules [NC,L,QSA]
RewriteRule faq$ index.php?page=faq [NC,L,QSA]
RewriteRule apidoc$ index.php?page=apidoc [NC,L,QSA]
RewriteRule map$ index.php?page=map [NC,L,QSA]
RewriteRule find$ index.php?page=find [NC,L,QSA]
RewriteRule ranges$ index.php?page=ranges [NC,L,QSA]
RewriteRule devmac$ index.php?page=devmac [NC,L,QSA]
RewriteRule wpspin$ index.php?page=wpspin [NC,L,QSA]
RewriteRule upload$ index.php?page=upload [NC,L,QSA]
RewriteRule graph$ index.php?page=graph [NC,L,QSA]
RewriteRule stat$ index.php?page=stat [NC,L,QSA]
RewriteRule user$ index.php?page=user [NC,L,QSA]

# 404 page
ErrorDocument 404 /index.php?page=404

<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript application/json application/json-p
</ifModule>


Конфиг сайта
<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/wicat/public_html
	ErrorLog /var/www/wicat/error.log
	CustomLog /var/www/wicat/access.log combined
	<Directory /var/www/wicat/public_html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>
</VirtualHost>


Ubuntu18.04.5 Apache2.4.29 PHP5.6
  • Вопрос задан
  • 110 просмотров
Пригласить эксперта
Ваш ответ на вопрос

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

Похожие вопросы