2013-05-31 118 views
0

我試圖運行secondcrack這是一個php解決方案,在nginx服務器中的靜態文件Markdown博客引擎(原來只在Apache中測試過)。那麼有誰知道如何將這個Apaches的.htaccess轉換爲nginx語法?在nginx服務器上運行secondcrack

Options -MultiViews 

AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript text/xml text/rss text/rss+xml 

RewriteEngine On 

RewriteRule ^([^\.]*)$ - [T=text/html] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_FILENAME}.html -f 
RewriteRule ^(.*)$ $1.html [QSA,L] 

ErrorDocument 404 /404.html 
ErrorDocument 500 /500.html 

回答

1

在這裏我們去:

index index.html 
location ~ ^/your_blog_location/. { 
    default_type text/html; 
    try_files $uri $uri.html; 
    error_page 404 = /404.html; 
    error_page 500 502 503 504 = /500.html; 
} 

不要忘記 - >重啓nginx的,一旦這些完成)