私はDrupalにサイト "new.mysite.com"を持っています。 vhostファイルには、このWebサイトのサーバー上の別の場所を指すディレクトリ「weight-loss」があります。 このフォルダには、mod_rewriteを使用しているZend Frameworkに基づくミニサイトがあります。 mod_rewriteは動作しません。エイリアス化されていないフォルダではなく、別の場所で同じミニサイトが動作するため、このフォルダはエイリアスです。 "/ home/weight-loss/admin /"にあるミニサイト。 .htaccessファイルはエイリアス化されたフォルダ内のhtaccess modリライトが動作しません。
http://new.mysite.com/weight-loss/admin/dashboard/index があるべき "/home/weight-loss/admin/.htaccess" である:私は間違って何をやっている http://new.mysite.com/weight-loss/admin/index.php?module=dashboard&controller=index
?
バーチャルホストの設定
<VirtualHost 192.168.100.142:80>
ServerAdmin [email protected]
DocumentRoot /home/drupal_1
ServerName new.mysite.com
ServerAlias mysite.com www.mysite.com
Alias /weight-loss /home/weight-loss/
ErrorLog /var/log/httpd/mysite.com_err_log
CustomLog /var/log/httpd/mysite.com_log special
<Directory /home/drupal_1>
Options FollowSymLinks Includes ExecCGI
AllowOverride All
DirectoryIndex index.html index.htm index.php
</Directory>
</VirtualHost>
.htaccessファイル:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ /weight-loss/admin/index.php [NC,L]
ありがとう、Gerben。それが答えでした! – EricP