2015-10-13 44 views
0

所以我不明白從htaccess到hiawatha的轉換是如何工作的。你能提出一個好的網站或一本好書來探討這個話題嗎?.htaccess to .hiawatha正則表達式轉換

我的問題是下面的轉換:

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^((?s).*)$ index.php?_url=/$1 [QSA,L] 

htaccess的

RequestURI exists Return 
Match ^((?s).*)$ Rewrite /index.php?_url=/$1 

海華沙

但是匹配重寫說法是錯誤的...

+0

你能更具體與您的意思是「錯」是什麼? –

+0

由於配置中的Match聲明,Hiawatha沒有啓動...... – D4ny

+0

以防萬一有人感興趣這是教程7所需的:phalcon REST API [link](https://docs.phalconphp.com/en/latest/reference/tutorial-rest.html) – D4ny

回答

0

的海華沙URL的解決方案TOOLKIT是:

RequestURI exists Return 
Match ^/(.*) Rewrite /index.php?_url=/$1 

這會將所有內容重定向到index.php。 例如 http://host/get/123重寫到 http://host/index.php?_url=/get/123