【发布时间】:2016-11-20 18:43:21
【问题描述】:
我在 /htdocs/trunk 文件夹中有一个项目。主干内存在 Codeigniter 文件夹结构,例如“应用程序”、“系统”等。下面是 /htdocs/trunk/application 中的 .htaccess 文件:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# Removes index.php from ExpressionEngine URLs
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
</IfModule>
下面是我的config.php:
$config['base_url'] = 'http://localhost/trunk/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';
当我在浏览器中打开上面的基本 url 时,我成功获得了我的登录页面。但是,当我单击调用控制器功能的锚链接时,我得到 403 Forbidden。以下是路线、视图和错误:-
routes.php
$route['default_controller'] = "chomecontroller";
$route['search'] = "csearchentrycontroller";
$route['search/(:any)'] = "csearchentrycontroller/$1";
查看
<a href="<? echo base_url();?>search/searchEntry/4/1"> Redirect here </a>
错误
You don't have permission to access /trunk/< on this server.
任何帮助将不胜感激。谢谢
【问题讨论】:
标签: php apache .htaccess codeigniter