0

ubuntu m/c で apache2 を使用しています。mod_rewrite を有効にし、apache2.conf で Allowoveride All を変更しました

今、サーバーに Bug-Genie アプリケーションをインストールしようとしていますが、次の .htaccess ルールは例外として機能しません。

アクセスできます:

http://localhost/roxsoft/thebuggenie-3.2.6/thebuggenie/**index.php**/wiki

しかし、アクセスできません: --404 エラー

http://localhost/roxsoft/thebuggenie-3.2.6/thebuggenie/wiki

ここに私の .htaccess ファイルがあります:

# .htaccess file for The Bug Genie

# make sure that magic_quotes and register_globals is always off
<IfModule mod_php5.c>
    php_flag magic_quotes_gpc   off
    php_flag register_globals   off
</IfModule>

# rewrite rules
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
# Example:
# RewriteBase /
# or
# RewriteBase /dev/thebuggenie

  # skip all hidden files (starting with a .)
  RewriteCond %{REQUEST_URI} \..+$
  RewriteCond %{REQUEST_URI} !\.(html|wsdl|json|xml)$
  RewriteRule .* - [L]

  # redirect to front controller
  RewriteRule ^(.*)$ index.php?url=$1 [NC,QSA,L]

</IfModule>
# Stop people accessing directories they shouldn't have access to
RedirectMatch 403 ^/\.svn(/|$)
4

2 に答える 2

3

これを試して:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|assets|images|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

JavaScriptとCSSを含むフォルダを書き換え条件に追加

于 2013-08-16T16:13:08.943 に答える