rfrkk 发表于 2016-12-6 08:53:32

誰能幫我解釋這段rewrite意思

ci用的rewrite去除index.php

RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /my-test-project/ci/index.php/$1

例如各別輸入兩種網址
1. localhost/demo/
2. localhost/demo/index,php/news/2
我對 RewriteCond $1 !^(index\.php|images|robots\.txt) 裡頭的 $1 是指何者搞不懂
請教有工具或命令可以對$1 除錯嗎?

感謝

Hex 发表于 2016-12-6 14:07:33

apache url rewrite 建议参考下 url rewrite 官方手册,本问题和 CI 关系不大。
页: [1]
查看完整版本: 誰能幫我解釋這段rewrite意思