简体   繁体   English

在Phalcon中通过htaccess重定向POST数据

[英]Redirect POST Data by htaccess in Phalcon

I have following .htaccess RewriteRule: 我有以下.htaccess RewriteRule:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule  ^$ public/    [L]
    RewriteRule  (.*) public/$1 [L]

    RewriteRule upload.php upload [NC,L]

</IfModule>

However when I try to send post throught /upload.php it redirect me to my login page instead of sending data by /upload. 但是,当我尝试通过/upload.php发送帖子时,它会将我重定向到我的登录页面,而不是通过/ upload发送数据。

Could you tell me what I'm doing wrong? 你能告诉我我在做什么错吗?

I've done different way by adding custom routing: 我通过添加自定义路由来完成其他操作:

$router->add('/upload\.php', array(
    'controller' => 'upload',
    'action' => 'index',
));

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM