无法从全局区域codeigniter

时间:2016-06-04 23:18:09

标签: php .htaccess codeigniter

我在codeigniter app中有这些结构:

application
|
 --- some other folders
|
system
|
 --- some other folders
|
global
|
 --- docs
     |
      --- target folder
          |
           --- MY FILE

现在,我希望我的用户从http://test.com/global/docs/targetfolder/MYFile

下载文件

codeigniter的下载地址为http:://test.com/controller/method/variable,我会收到404错误。

请您告诉我如何解决这种情况?

这是我的主要.htaccess文件

# Turn on URL rewriting
RewriteEngine On

# Installation directory
#RewriteBase /

# Protect hidden files from being viewed
<Files .*>
    Order Deny,Allow
    Deny From All
</Files>

# Protect application and system files from being viewed
RewriteRule ^(?:application|system)\b.* index.php/$0 [L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]


<ifModule mod_headers.c>
 Header set Connection keep-alive 
 </ifModule>

RewriteCond %{HTTP_USER_AGENT} libwww-perl.* 
RewriteRule .* ? [F,L]


<IfModule mod_expires.c>
# Enable expirations
ExpiresActive On 
# Default directive
ExpiresDefault "access plus 1 month"
# My favicon
ExpiresByType image/x-icon "access plus 1 year"
# Images
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
# CSS
ExpiresByType text/css "access plus 1 month"
# Javascript
ExpiresByType application/javascript "access plus 1 year"
</IfModule>

0 个答案:

没有答案