Имеется .htaccess в корне
Код: Выделить всё
# Mod_Autoindex
<IfModule mod_autoindex.c>
# Запрещаем просмотр содержимого папок
Options -Indexes
</IfModule>
# Mod_Rewrite
<IfModule mod_rewrite.c>
Options +FollowSymlinks
# Включаем mod_rewrite
RewriteEngine On
#IndexIgnore */*
RewriteCond %{HTTP_HOST} ^www\.(.*)$
RewriteRule ^(.*)$ http://%1/$1 [L,R=301]
# Перенаправляем admin на входной скрипт админки
RewriteCond %{REQUEST_URI} ^/admin
RewriteRule ^admin(/.+)?$ /backend/web/$1 [L,PT]
# Перенаправляем api на входной скрипт api
RewriteCond %{REQUEST_URI} ^/api
RewriteRule ^api(/.+)?$ /api/web/$1 [L,PT]
RewriteCond %{REQUEST_URI} ^.*$
RewriteRule ^(.*)$ /frontend/web/$1
</IfModule>
в Папках api/web, backend/web, frontend/web
.htaccess
Код: Выделить всё
# use mode rewrite for pretty URL support
RewriteEngine on
# if a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule . index.php
При посещении адреса
http://url-site/api/
Выдает
Страница недоступна
Сайт url-site выполнил переадресацию слишком много раз.