Я пытаюсь перенаправить пользователя, если установлена папка, но пока мне не повезло.Htaccess, перенаправление, если существует папка
Ниже приведен файл htaccess.
RewriteEngine On
RewriteBase /enc/project/
# If the setup directory exists in the document root...
RewriteCond %{DOCUMENT_ROOT}/install -d
# ...and you're not in isntall..
RewriteCond %{REQUEST_URI} !(install) [NC]
# ...redirect to setup - with a 302 (temporary redirect) to make sure the browser won't cache the redirect.
RewriteRule ^(.*) /install [L,redirect=302]
# ...rest of htaccess for codeigniter
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
Проект CodeIgniter находится в /enc/project/
в моем сервере То почему RewriteBase.
Project Structure is
htdocs/enc/project/
|-- application/
| |-- project
|
|-- system/
| |-- project
|
|-- install/
| |-- test/
| | |-- test_main.php
| |
| |-- index.php
|
|-- htaccess
'LOCALHOST/прил/project' – LefterisL
я редактировал вопрос с моей структурой проекта – LefterisL
я попробую сейчас и дам вам знать. Спасибо – LefterisL