[英]how to remove index.php from codeigniter path
this is my wamp/www/.htaccess 这是我的沼泽/www/.htaccess
RewriteEngine on
RewriteCond $1 !^(index\.php|images|assets|robots\.txt)
RewriteRule ^(.*)$ /project-name/index.php/$1 [L]
# Added a rewrite to respond with a 200 SUCCESS on every OPTIONS request
RewriteCond %{REQUEST_METHOD} OPTIONS
RewriteRule ^(.*)$ $1 [R=200,L]
**strong text**
but error showing The requested URL /ci/public/signup was not found on this server. 但是在此服务器上找不到显示请求的URL / ci / public / signup的错误。
Apache/2.4.9 (Win64) PHP/5.5.12 Server at ::1 Port 80 what is the problem.. i also remove index.php from config.php file.. Apache / 2.4.9(Win64)PHP / 5.5.12 Server at :: 1 Port 80这是什么问题..我还从config.php文件中删除了index.php。
Try the following 尝试以下
Open config.php and do following replaces 打开config.php并执行以下替换
$config['index_page'] = "index.php"
to 至
$config['index_page'] = ""
In some cases the default setting for uri_protocol does not work properly. 在某些情况下,uri_protocol的默认设置无法正常工作。 Just replace
只需更换
$config['uri_protocol'] ="AUTO"
by 通过
$config['uri_protocol'] = "REQUEST_URI"
HTACCESS HTACCESS
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
HTACCESS HTACCESS
RewriteEngine on
RewriteRule ^(.*)$ ./index.php/$1 [L]
RewriteCond $1 !^(index\.php|resources|robots\.txt)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.