enter code here
Я получил этот код в моем файле .htaccess:CodeIgniter URL не найден
RewriteEngine On
RewriteBase /projFolder
### Canonicalize codeigniter URLs
# If your default controller is something other than
# "welcome" you should probably change this
RewriteRule ^(mycontrol(/index)?|index(\.php)?)/?$/[L,R=301]
RewriteRule ^(.*)/index/?$ $1 [L,R=301]
# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]
# Enforce www
# If you have subdomains, you can add them to
# the list using the "|" (OR) regex operator
RewriteCond %{HTTP_HOST} !^(www|subdomain) [NC]
RewriteRule ^(.*)$ http://www.domain.tld/$1 [L,R=301]
# Enforce NO www
#RewriteCond %{HTTP_HOST} ^www [NC]
#RewriteRule ^(.*)$ http://domain.tld/$1 [L,R=301]
###
# 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]
Мой проект в/вар/WWW/projFolder -> структура в этой папке находится
/application
/system
/user_guide
.htaccess
index.php
я изменил $ route ['default_controller'] = "mycontrol"; в файле config routes.php. если я набираю url localhost/projFolder/загружает контроллер mycontrol.php по умолчанию и функцию индекса с этого контроллера. Если я иду localhost/projFolder/myFunction ->, то есть я хочу загрузить myFunction из контроллера по умолчанию, он дает мне «Запрошенный URL-адрес не найден на этом сервере». Может ли кто-нибудь помочь? Благодарю.
проблема заключается в том, что я должен написать локальный/projFolder/index.php/загружать контроллеры и функции от контроллеров. Я хочу удалить index.php из URL-адреса, чтобы он работал как localhost/projFolder/mycontrol –
@LachezarRaychev ok, поэтому проверьте, что мой ответ обновлен сейчас, у вас возникли проблемы с переписыванием URL-адресов, чтобы он мог быть htaccess или конфигурационным файлом. попробовал мой htaccess? – sbaaaang
Да ... к сожалению это не работает :(5 часов на этом sh * T уже –