简体   繁体   English

Drupal新手问题

[英]Drupal newbie question

所有请求都在index.php中处理吗?

Yes. 是。 All* requests will go through index.php there is a rewrite rule in the .htaccess file which masks this and gives user friendly urls. 所有*请求都将通过index.php进行。.htaccess文件中有一个重写规则,该规则会对此进行屏蔽并提供用户友好的URL。

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

If Drupal can't invoke these rules then you will see index.php in the browser URL. 如果Drupal无法调用这些规则,那么您将在浏览器URL中看到index.php。

**There are cron.php and update.php which don't but these are special files for admin so are not part of the run of the mill site.* **有些cron.php和update.php不会,但是这些是管理员专用文件,因此它们不是工厂站点运行的一部分。*

Yes. 是。 If you're looking for certain code snippets that handles URL parsing and calls various modules then take a look inside bootstrap.inc 如果您正在寻找可处理URL解析并调用各种模块的某些代码段,那么请查看bootstrap.inc

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM