2010-02-09 29 views
11

到重寫規則我重定向所有請求,像這樣:試圖把一個例外,在.htaccess

RewriteRule ^sitemap.xml$ sitemap.php?/ [QSA,L] 

# the line below is the one I'm having trouble with 

RewriteCond %{REQUEST_URI} !^market-reports$ 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule (.*) /index.php?section=$1 [QSA,L] 

我所有的導入鏈接是爲了去的index.php,你可以看到。但是現在我想阻止一個人去那裏。我從來沒有寫過我自己的RewriteCond,所以我有點不確定我所做的是否正確。

基本上我想說的是:「?如果傳入的URL是一個文件,目錄或/市場報告/什麼也不做,否則對URL的index.php發送節=」

什麼我做錯了嗎?謝謝

+0

重寫規則^東西 - [L] – AbiusX 2015-05-13 02:53:58

回答