3
我试图在不使用.htaccess文件的情况下启用drupal 7中的重写功能,因为只有在您没有对服务器的根访问权时才使用它(相应于Apache的网站)Drupal 7重写不使用.htaccess
没有任何进一步再见,这里是我的配置
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
DirectoryIndex index.php
DocumentRoot /var/www/example.com/public
ErrorDocument 404 /index.php
LogLevel warn
ErrorLog /var/www/example.com/log/error.log
CustomLog /var/www/example.com/log/access.log combined
<Directory "/var/www/example.com/public">
Options -Indexes +FollowSymLinks +ExecCGI
AllowOverride None
Order allow,deny
Allow from all
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA]
</Directory>
</VirtualHost>
当我在.htaccess文件有它重写配置工作,但不是当我把它放在虚拟主机文件中。
你们能看到这里有什么不对吗?
谢谢您的回答,抱歉我的不可回收性回答。 我试过没有'/',但仍然存在与以前相同的问题=/ 我可以阅读第一个索引页并转到联系表单等等,但是当我尝试访问博客实体时,我会重定向回到索引页面。我还在日志文件中找到文件未找到的错误消息。 – Fever 2013-03-14 18:24:47
好吧,请不要将我的答案标记为已接受,这会让您的案例适用于所有用户。改为upvot。然后Upadet你的问题,增加有关网址工作和不工作的细节。 – regilero 2013-03-15 08:38:48