我想要做的是去除index.php文件在我的网址在这笨以下文件:在.htaccess文件RewriteEngine叙述规则和笨路线问题
http://www.codeigniter.com/userguide3/general/urls.html#removing-the-index-php-file
我写的。与THID代码htaccess文件:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
但是,当我尝试访问的网址:http://127.0.0.1/my-site/admin,这将被重定向到http://127.0.0.1/dashboard
这是我BASE_URL配置:
$配置[ 'BASE_URL'] = 'http://127.0.0.1/my-site';
这是routes.php文件文件:
$route['default_controller'] = 'home';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;
$route['admin']='admin/index';
$route['admin/login']='admin/login';
任何帮助,将不胜感激!
确保.htaccess正在或未在您的本地主机设置中。按照说明[这里](http://stackoverflow.com/questions/17162214/htaccess-not-working-on-localhost-with-xampp#answer-17164484)... –
把一个斜杠放在基地址的末尾。 – Tpojka
网址中的仪表板如何来自一个问题?你有任何控制器与指定的仪表板 –