简体   繁体   中英

Redirect POST Data by htaccess in Phalcon

I have following .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.

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',
));

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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