2

我想做的很简单。我想编辑标准 Centos 服务器上的网页的 html 文件。我可以很好地访问它,并且 Apache 设置为在 /var/www/sitename 中查找。这是我的问题:

我要编辑的页面的网址是这样的:http://www.yoursite/page1

我认为在 /var/www/sitename 的某个地方,应该有一个名为 page1.html 的文件。但是没有。我在 FileZilla 和 Putty 中运行了搜索功能(使用 find /var/www/yoursite/ -exec grep -l "jeyword-from-page-1" {} \;

这一切看起来都很简单,但我找不到我应该编辑的文件。我应该在哪里寻找它?非常感谢任何想法或提示。提前感谢您的时间!

编辑:

谢谢大家的回复。这是我在 htaccess 文件中找到的内容:

<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>

# Set the default handler.
DirectoryIndex index.php



  # 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>

这些在我看来是可疑的,与其他行没有什么不同。会是这样吗?

EDIT2:我刚刚在我的 index.php 文件中找到了这些行:

/**
 * @file
 * The PHP page that serves all page requests on a Drupal installation.
 *
 * The routines here dispatch control to the appropriate handler, which then
 * prints the appropriate page.
 *
 * All Drupal code is released under the GNU General Public License.
 * See COPYRIGHT.txt and LICENSE.txt.
 */
4

3 回答 3

1

检查您的服务器块/虚拟主机配置以了解文件所在的位置

这应该在Apache/etc/apache2/或Nginx中的某个地方/etc/httpd//etc/nginx//opt/local/nginx/

于 2012-11-12T21:39:52.020 回答
1

我认为不必有一个名为该名称的页面。.htaccess 文件可能会覆盖此类请求的默认路由,并且您的页面很可能有一个脚本,该脚本会加载具有完全不同文件名的文件以显示内容。(很抱歉,如果我假设不正确,您并不完全了解您的网络服务器上的网页是做什么的)

于 2012-11-12T21:47:38.150 回答
1

我不认为你需要grep。使用这样的名称:find /path/to/site -name "filename"。

于 2012-11-12T21:43:08.297 回答