.htaccess - UWSGi, how to convert wordpress htaccess into plugin router_redirect -
i convert htaccess:
# begin wordpress <ifmodule mod_rewrite.c> rewriteengine on rewritebase / rewriterule ^index\.php$ - [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule . /index.php [l] </ifmodule> # end wordpress
into format required uwsgi (as explained here: http://uwsgi-docs.readthedocs.org/en/latest/internalrouting.html).
i think should write this:
plugins = router_redirect route-if = exists break route-label = index route = .* index.php
but i'm not expert of uwsgi. appreciated. thanks
route-if-not = exists:${document_root}/${path_info} setpathinfo:/index.php
this should enough, or if want use rewrite action (it fixes script_name too, needed on php)
route-if-not = exists:${document_root}/${path_info} rewrite:/index.php
Comments
Post a Comment