どういうわけか、私たちのほとんどが.htaccessで問題を抱えていると思います.誰かが私を助けることができるかどうか知りたいです. Opensuse 12.3 : コード:
Linux linux-hyo0.site 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba) x86_64 x86_64 x86_64 GNU/Linux
自分のマシンに Cakephp をインストールしたいのですが、Web ページに「コード: URL 書き換えがサーバーで適切に構成されていません 」というエラーが表示されます。
私の/ etc/sysconfig/apache2ファイルは次のとおりです:コード:
APACHE_MODULES="authz_host actions alias auth_basic authz_groupfile authn_file authz_user autoindex cgi dir include log_config mime negotiation setenvif status userdir asis imagemap php5 reqtimeout authz_default rewrite"
そして /etc/apache2/sysconfig.d/loadmodule.conf の最後のコード:
LoadModule rewrite_module /usr/lib64/apache2/mod_rewrite.so
ファイル etc/apache2/defaul-server.conf も変更しました
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory "/srv/www/htdocs">
Options Indexes FollowSymLinks MultiViews
AllowOverride ALL
Order Allow,Deny
Allow from all
</Directory>
何か助けはありますか?
app/webroot で
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
そしてアプリで/
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>