2016-11-20 18:43
浏览 39


I have a project inside /htdocs/trunk folder. Codeigniter folder structure such as 'application', 'system' etc exist inside trunk. Below is .htaccess file which is inside /htdocs/trunk/application:

<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]

Below is my config.php:

$config['base_url'] = 'http://localhost/trunk/';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';  

When I open the base url above in the browser, I successfully get my login page. However, when I click on anchor link which calls the controller function, I get 403 Forbidden. Below is routes, view and error:-


$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.  

Any help would be highly appreciated. Thank you

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • dounan4479 2016-11-21 09:12

    I think so You would have skip the index.php in between the URL. Please include index.php in between URL and check whether its working or not.

    Ex: http://localhost:90/codeigniter_captcha/index.php/{controller_name}.

    After that if you want to skip index.php in between URL change it in Config File.

    解决 无用
    打赏 举报

相关推荐 更多相似问题