Я занимаюсь разработкой сайта на своем локальном хосте (приложение Usbwebserver). Я использую CodeIgniter Framework:
URL-адрес "http://localhost/daniel/index.php"
со следующими параметрами:
конфиг / маршруты:
$route['default_controller'] = "site";
конфиг / конфигурация:
$config['base_url'] = "http://localhost/daniel";
$config['index_page'] = "";
$config['uri_protocol'] = "REQUEST_URI";
Я пробовал следующий код .htaccess:
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
# Если у нас не установлен mod_rewrite, все 404
# можно отправить в index.php, и все работает как обычно.
# Представлено: ElliotHaughin
ErrorDocument 404 /index.php
Я хочу удалить index.php и загрузить свой контроллер по умолчанию с http://localhost/daniel.
Есть предложения?