鍍金池/ 問答/PHP  Linux/ 怎么找到nginx或apache經(jīng)過URL重寫后的實(shí)際URL

怎么找到nginx或apache經(jīng)過URL重寫后的實(shí)際URL

比如我在.htaccess中這樣寫

<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Multiviews
  RewriteEngine On

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?$1 [QSA,PT,L]
</IfModule>

當(dāng)我在瀏覽器訪問//domain.com/abc時(shí),實(shí)際請求的是//domain.com/index.php?abc
如果轉(zhuǎn)發(fā)的規(guī)則很復(fù)雜,而且數(shù)量很多,我不知道實(shí)際命中了哪個(gè)規(guī)則的情況下,如何知道轉(zhuǎn)發(fā)后的實(shí)際請求的URL?

回答
編輯回答
吢涼

nginx在server段添加:

rewrite_log on;
error_log /home/wwwroot/default/nginx_error.log info;

apache:
參考:http://www.drupal001.com/2012...

2018年3月22日 10:12