Php drupal未找到此服务器上未找到请求的url

Php drupal未找到此服务器上未找到请求的url,php,mysql,apache,.htaccess,drupal,Php,Mysql,Apache,.htaccess,Drupal,在过去的两天里,我陷入了一种奇怪的境地。我在我的/var/www/html文档根目录中安装了一个名为drupal的drupal,我使用url的http://domainname/drupal'. 天气很好。在drupal/sites/default目录的settings.php中,我将$base\u url设置为http://domainname/drupal。在同一个目录/var/www/html中,我创建了名为drupalix的drupal副本。我导出了drupal项目的数据库&创建了一个新

在过去的两天里,我陷入了一种奇怪的境地。我在我的
/var/www/html
文档根目录中安装了一个名为drupal的drupal,我使用url的http://domainname/drupal'. 天气很好。在
drupal/sites/default
目录的
settings.php
中,我将
$base\u url
设置为
http://domainname/drupal
。在同一个目录
/var/www/html
中,我创建了名为
drupalix
的drupal副本。我导出了drupal项目的数据库&创建了一个新的数据库,并与之关联
Drupalix
。我在
drupalix/sites/default/settings.php
文件的
settings.php
中更改了所需的
$db\u url
设置。我还将
$base\uURL
变量更改为
http://domainname/drupalsix
。当我试图打开url
http://domainname/drupalsix
未打开&显示一条消息
未找到此服务器上未找到请求的url
。我已将
.htaccess
文件从drupal正确复制到Drupalix目录,
clean url
也被禁用。在我的
httpd.conf
文件中,我为drupal和drupal six提供了
AllowOverride All
,如下所示:-

<Directory /var/www/html/drupal>
    AllowOverride All
</Directory>   
AccessFileName .htaccess

<Directory /var/www/html/drupalsix>
    AllowOverride All
</Directory>
AccessFileName .htaccess 

允许超越所有
AccessFileName.htaccess
允许超越所有
AccessFileName.htaccess
我还在这里附上.htaccess文件以供参考。请帮助我,因为我没有发现我的设置有什么问题。对于drupal来说,一切都很好,但是对于Drupalix来说,它显示的是找不到。我的操作系统是cent os linux。提前谢谢 这是我的.htaccess文件

#
# Apache/PHP/Drupal settings:
#

# Protect files and directories from prying eyes.
<FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl|svn-base)$|^(code-style\.pl|Entries.*|Repository|Root|Tag|Template|all-wcprops|entries|format)$">
  Order allow,deny
</FilesMatch>

# Don't show directory listings for URLs which map to a directory.
Options -Indexes

# Follow symbolic links in this directory.
Options +FollowSymLinks

# Make Drupal handle any 404 errors.
ErrorDocument 404 /index.php

# Force simple error message for requests for non-existent favicon.ico.
<Files favicon.ico>
  # There is no end quote below, for compatibility with Apache 1.3.
  ErrorDocument 404 "The requested file favicon.ico was not found.
</Files>

# Set the default handler.
DirectoryIndex index.php kjsfgbvytuilwecftuwel

# Override PHP settings. More in sites/default/settings.php
# but the following cannot be changed at runtime.

# PHP 4, Apache 1.
<IfModule mod_php4.c>
  php_value magic_quotes_gpc                
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 4, Apache 2.
<IfModule sapi_apache2.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# PHP 5, Apache 1 and 2.
<IfModule mod_php5.c>
  php_value magic_quotes_gpc                0
  php_value register_globals                0
  php_value session.auto_start              0
  php_value mbstring.http_input             pass
  php_value mbstring.http_output            pass
  php_value mbstring.encoding_translation   0
</IfModule>

# Requires mod_expires to be enabled.
<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

  # Cache all files for 2 weeks after access (A).
  ExpiresDefault A1209600

  <FilesMatch \.php$>
    # Do not allow PHP scripts to be cached unless they explicitly send cache
    # headers themselves. Otherwise all scripts would have to overwrite the
    # headers set by mod_expires if they want another caching behavior. This may
    # fail if an error occurs early in the bootstrap process, and it may cause
    # problems if a non-Drupal PHP file is installed in a subdirectory.
    ExpiresActive Off
  </FilesMatch>
</IfModule>

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

  # If your site can be accessed both with and without the 'www.' prefix, you
  # can use one of the following settings to redirect users to your preferred
  # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
  #
  # To redirect all users to access the site WITH the 'www.' prefix,
  # (http://example.com/... will be redirected to http://www.example.com/...)
  # adapt and uncomment the following:
  # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
  # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
  #
  # To redirect all users to access the site WITHOUT the 'www.' prefix,
  # (http://www.example.com/... will be redirected to http://example.com/...)
  # uncomment and adapt the following:
  # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
  # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

  # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
  # VirtualDocumentRoot and the rewrite rules are not working properly.
  # For example if your site is at http://example.com/drupal uncomment and
  # modify the following line:
  # RewriteBase /drupal
  #
  # If your site is running in a VirtualDocumentRoot at http://example.com/,
  # uncomment the following line:
  # RewriteBase /

  # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>

# $Id$
#
#Apache/PHP/Drupal设置:
#
#保护文件和目录免受窥探。
命令允许,拒绝
#不显示映射到目录的URL的目录列表。
选项-索引
#遵循此目录中的符号链接。
选项+FollowSymLinks
#让Drupal处理任何404错误。
ErrorDocument 404/index.php
#对不存在的favicon.ico请求强制发送简单错误消息。
#为了与Apache1.3兼容,下面没有结束语。
ErrorDocument 404“未找到请求的文件favicon.ico。
#设置默认处理程序。
DirectoryIndex.php kjsfgbvytuilwecftuwel
#覆盖PHP设置。更多信息,请访问sites/default/settings.PHP
#但在运行时无法更改以下内容。
#PHP4,Apache1。
php\u值魔术\u引号\u gpc
php\u值寄存器\u全局0
php_值session.auto_启动0
php_值mbstring.http_输入传递
php_值mbstring.http_输出过程
php_值mbstring.encoding_翻译0
#PHP4,Apache2。
php\u值魔法\u引号\u gpc 0
php\u值寄存器\u全局0
php_值session.auto_启动0
php_值mbstring.http_输入传递
php_值mbstring.http_输出过程
php_值mbstring.encoding_翻译0
#PHP5、Apache1和Apache2。
php\u值魔法\u引号\u gpc 0
php\u值寄存器\u全局0
php_值session.auto_启动0
php_值mbstring.http_输入传递
php_值mbstring.http_输出过程
php_值mbstring.encoding_翻译0
#需要启用mod_expires。
#启用过期。
过期于
#访问后将所有文件缓存2周(A)。
到期默认A1209600
#不允许缓存PHP脚本,除非它们显式地发送缓存
#标题本身。否则所有脚本都必须覆盖
#如果mod_设置的头需要另一个缓存行为,则会过期。这可能会导致
#如果在引导过程的早期出现错误,则失败,并可能导致
#如果在子目录中安装了非Drupal PHP文件,则会出现问题。
过期活动关闭
#各种重写规则。
重新启动发动机
#如果您的站点既可以使用“www.”前缀访问,也可以不使用“www.”前缀访问,则您可以
#可以使用以下设置之一将用户重定向到您的首选
#URL,带或不带“www.”前缀。请仅选择一个选项:
#
#要重定向所有用户以访问带有“www.”前缀的网站,
# (http://example.com/... 将被重定向到http://www.example.com/...)
#调整和取消注释以下内容:
#RewriteCond%{HTTP_HOST}^example\.com$[NC]
#重写规则^(.*)$http://www.example.com/$1[L,R=301]
#
#要重定向所有用户以访问不带“www.”前缀的站点,
# (http://www.example.com/... 将被重定向到http://example.com/...)
#取消注释并调整以下内容:
#RewriteCond%{HTTP_HOST}^www\.example\.com$[NC]
#重写规则^(.*)$http://example.com/$1[L,R=301]
#如果在子目录或子目录中使用Drupal,请修改RewriteBase
#VirtualDocumentRoot和重写规则无法正常工作。
#例如,如果您的站点位于http://example.com/drupal 取消注释和
#修改以下行:
#重写BASE/drupal
#
#如果您的站点在以下位置的VirtualDocumentRoot中运行:http://example.com/,
#取消对以下行的注释:
#重写基/
#将表单“x”的URL重写为表单“index.php?q=x”。
重写cond%{REQUEST_FILENAME}!-f
重写cond%{REQUEST_FILENAME}!-d
RewriteCond%{REQUEST_URI}!=/favicon.ico
重写规则^(.*)$index.php?q=$1[L,QSA]
#$Id$
我确信这是最好的方法

这是一个来自drupal的页面,包含许多关于多站点drupal的教程