2012-06-07 41 views
1

到目前爲止,我一直在使用mod重寫。與mod重寫500錯誤無法看到最新錯誤?

Options +FollowSymLinks 
RewriteEngine On 
RewriteCond %{SCRIPT_FILENAME} !-d 
RewriteCond %{SCRIPT_FILENAME} !-f 

RewriteRule ^/?(shopping-catalogue)/([0-9]+) index.php?friendly_url=$1&view=catalogue&catalogue_id=$2 [L] 
RewriteRule ^/?(shopping-catalogue)/(category)/([0-9]+) index.php?friendly_url=$1&view=$2&category_id=$3 [L] 
RewriteRule ^/?(shopping-catalogue)/(category-item)/([0-9]+) index.php?friendly_url=$1&view=$2&category_item_id=$3 [L] 
RewriteRule ^/?(shopping-catalogue)/(category-item-option)/([0-9]+) index.php?friendly_url=$1&view=$2&category_item_option_id=$3 [L] 

# marketing module see newsletter before sending 
RewriteRule ^/?(newsletters)/([A-Za-z0-9-]+)/(newsletter)\.html /newsletters/$2/newsletter.html [L] 


RewriteRule .([^/]+)\.html index.php [L] 


#RewriteRule ^/client-area/CLID/([0-9]+) /index.php?temp=template_dataroom&CLID=$1 [L] 


# allow access with no restrictions to local machine at 192.168.1.3 
RewriteCond %{REMOTE_ADDR} !192.168.1.3 


# allow access to all .css and .js in sub-directories.. 
RewriteCond %{REQUEST_URI} !\.css$ 
RewriteCond %{REQUEST_URI} !\.js$ 

# allow access to the files inside img/, but not a directory listing.. 
RewriteCond %{REQUEST_URI} !dataroom/(.*)\. 
RewriteRule ^files/([^/]+)/([^/]+).zip /download.php?section=$1&file=$2 [NC] 
# allow access to these particular files... 

我的問題似乎是,此行被忽略

# marketing module see newsletter before sending 
RewriteRule ^/?(newsletters)/([A-Za-z0-9-]+)/(newsletter)\.html /newsletters/$2/newsletter.html [L] 

我想直接訪問一個html文件,但該文件夾是一個獨特的名字,每次....即 -

http://www.awebsite.co.uk/newsletters/template_4fd09c5b429ea/newsletter.html 

該行被忽略。我不懂爲什麼?

任何幫助將不勝感激。

感謝

安迪

+0

好吧我更新它包含下劃線字符現在我得到一個500錯誤。 –

回答

0

確定我現在的工作,。接過/關閉重定向鏈接

這裏是線我現在有

# marketing module see newsletter before sending 
RewriteRule ^/?(newsletters)/([A-Za-z0-9_]+)/(newsletter)\.html newsletters/$2/newsletter.html [L] 

感謝

安迪

0

我沒有檢查的結果,但你似乎並不被允許下劃線

RewriteRule ^/?(newsletters)/([A-Za-z0-9-]+)/(newsletter)\.html /newsletters/$2/newsletter.html [L] 

RewriteRule (newsletters)/([A-Za-z0-9|-|_]+)/(newsletter)\.html /newsletters/$2/newsletter.html [L] 

此外,我不認爲你需要開始與雙t(^)。