Codeigniter Bonfire内部链接不起作用

时间:2015-07-02 16:52:57

标签: php codeigniter

我在ubuntu中安装了codeigniter篝火。它运行正常但内部链接不起作用。相同的系统在Windows中正常运行但在ubuntu服务器中有问题。我安装php重写模块和php curl。我的项目路径是: -

select `neighbourhood_id`, 
    `listing_for_sale`, `total_sale_price` / `listing_for_sale` as `avg_sale_price`,
    `listing_for_rent`, `total_rent_price` / `listing_for_rent` as `avg_rent_price` from
    (SELECT `neighbourhood_id`,
        SUM(IF(`c`.`listing_offer` = 1, 1, 0)) as `listing_for_sale`,
        SUM(IF(`c`.`listing_offer` = 1, `price`, 0)) as `total_sale_price`,
        SUM(IF(`c`.`listing_offer` = 2, 1, 0)) as `listing_for_rent`,
        SUM(IF(`c`.`listing_offer` = 2, `price`, 0)) as `total_rent_price`
    FROM (
        SELECT `n`.`id` AS `neighbourhood_id`, `l`.*
        FROM `listing` `l`
         LEFT JOIN `address` `a` ON `l`.`address_id` = `a`.`id` 
         LEFT JOIN `address_neighbourhood` `an` ON `a`.`id` = `an`.`address_id` 
         LEFT JOIN `neighbourhood` `n` ON `an`.`neighbourhood_id` =        `n`.`id` 
        WHERE (`l`.`deleted`=0) 
         AND `n`.`id` IS NOT NULL
    ) `c`
  GROUP BY `neighbourhood_id`
) `d`

我的.htaccess文件代码是: -

var/www/html/file_manager

.htaccess文件有什么问题..我收到的错误如下: -

# ----------------------------------------------------------------------
# Webfont access
# ----------------------------------------------------------------------

# Allow access from all domains for webfonts.
# Alternatively you could only whitelist your
# subdomains like "subdomain.example.com".

<IfModule mod_headers.c>
  <FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
    Header set Access-Control-Allow-Origin "*"
  </FilesMatch>
</IfModule>

# ----------------------------------------------------------------------
# Proper MIME type for all files
# ----------------------------------------------------------------------

  # JavaScript
  #   Normalize to standard type (it's sniffed in IE anyways)
  #   tools.ietf.org/html/rfc4329#section-7.2
  AddType application/javascript         js

  # Audio
  AddType audio/ogg                      oga ogg
  AddType audio/mp4                      m4a

  # Video
  AddType video/ogg                      ogv
  AddType video/mp4                      mp4 m4v
  AddType video/webm                     webm

  # SVG
  #   Required for svg webfonts on iPad
  #   twitter.com/FontSquirrel/status/14855840545
  AddType     image/svg+xml              svg svgz
  AddEncoding gzip                       svgz

  # Webfonts
  AddType application/vnd.ms-fontobject  eot
  AddType application/x-font-ttf         ttf ttc
  AddType font/opentype                  otf
  AddType application/x-font-woff        woff

  # Assorted types
  AddType image/x-icon                        ico
  AddType image/webp                          webp
  AddType text/cache-manifest                 appcache manifest
  AddType text/x-component                    htc
  AddType application/xml                     rss atom xml rdf
  AddType application/x-chrome-extension      crx
  AddType application/x-opera-extension       oex
  AddType application/x-xpinstall             xpi
  AddType application/octet-stream            safariextz
  AddType application/x-web-app-manifest+json webapp
  AddType text/x-vcard                        vcf

# ----------------------------------------------------------------------
# Gzip compression
# ----------------------------------------------------------------------

<IfModule mod_deflate.c>

  # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
  <IfModule mod_setenvif.c>
    <IfModule mod_headers.c>
      SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
      RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
    </IfModule>
  </IfModule>

  # HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
  <IfModule filter_module>
    FilterDeclare   COMPRESS
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/html
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/css
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/plain
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/x-component
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/javascript
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/json
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xhtml+xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/rss+xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/atom+xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/vnd.ms-fontobject
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/svg+xml
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/x-icon
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/x-font-ttf
    FilterProvider  COMPRESS  DEFLATE resp=Content-Type $font/opentype
    FilterChain     COMPRESS
    FilterProtocol  COMPRESS  DEFLATE change=yes;byteranges=no
  </IfModule>

  <IfModule !mod_filter.c>
    # Legacy versions of Apache
    AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
    AddOutputFilterByType DEFLATE application/javascript
    AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
    AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
    AddOutputFilterByType DEFLATE image/x-icon image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
  </IfModule>

</IfModule>

# ----------------------------------------------------------------------
# Start rewrite engine
# ----------------------------------------------------------------------

# Turning on the rewrite engine is necessary for the following rules and features.
# FollowSymLinks must be enabled for this to work.

<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Indexes
  RewriteEngine On

  # If you installed Bonfire in a subfolder, you will need to 
  # change the following line to match the subfolder you need. 
  # http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
  RewriteBase /file_manager/

  #Removes access to the system folder by users.
  #Additionally this will allow you to create a System.php controller,
  #previously this would not have been possible.
  #'system' can be replaced if you have renamed your system folder.
  RewriteCond %{REQUEST_URI} ^bonfire/codeigniter.*
  RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>

# Rewrite "www.example.com -> example.com"

<IfModule mod_rewrite.c>
  RewriteCond %{HTTPS} !=on
  RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
</IfModule>



#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php

<IfModule mod_rewrite.c>
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

# ----------------------------------------------------------------------
# UTF-8 encoding
# ----------------------------------------------------------------------

# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset utf-8

# Force UTF-8 for a number of file formats
AddCharset utf-8 .css .js .xml .json .rss .atom

# Block access to "hidden" directories whose names begin with a period. This
# includes directories used by version control systems such as Subversion or Git.
<IfModule mod_rewrite.c>
  RewriteCond %{SCRIPT_FILENAME} -d
  RewriteCond %{SCRIPT_FILENAME} -f
  RewriteRule "(^|/)\." - [F]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 index.php
</IfModule>

0 个答案:

没有答案