phalcon 訪問IndexController 中只能訪問indexAction方法,訪問不了testAction
但是可以訪問ArticleController裡面的任意方法
看說是Apache 的rewrite問題,
但是我的.htaccess檔案都是按照文檔裡面的。
兩個.htaccess
第一個
RewriteEngine onRewriteRule ^$ public/ [L]RewriteRule ((?s).*) public/$1 [L]
public目錄下面的.htaccess中
RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
訪問路由 localhost/index/test訪問不到,但是localhost/index.php?_url=/index/test可以訪問得到
求大神指點
回複內容:
phalcon 訪問IndexController 中只能訪問indexAction方法,訪問不了testAction
但是可以訪問ArticleController裡面的任意方法
看說是Apache 的rewrite問題,
但是我的.htaccess檔案都是按照文檔裡面的。
兩個.htaccess
第一個
RewriteEngine onRewriteRule ^$ public/ [L]RewriteRule ((?s).*) public/$1 [L]
public目錄下面的.htaccess中
RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME} !-fRewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
訪問路由 localhost/index/test訪問不到,但是localhost/index.php?_url=/index/test可以訪問得到
求大神指點