gpt4 book ai didi

ruby - 如何为 WordPress 多站点编写 h2o webserver mruby 处理程序?

转载 作者:数据小太阳 更新时间:2023-10-29 06:55:11 26 4
gpt4 key购买 nike

这就是 Apache 所需要的。我想知道how I do this in h2o.

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

//顺便说一句,浪费了 300 声望。

最佳答案

基本上,您的 Apache 文件对于 WordPress 来说有点太多了。

这应该可以解决 H2O 问题:

hosts:
"www.example.com":
listen:
port: 80
paths:
"/":
file.dir: /path/to/doc-root # serve static files if found
redirect: # if not found, internally redirect to /index.php/<path>
url: /index.php/
internal: YES
status: 307

file.custom-handler: # handle PHP scripts using php-cgi (FastCGI mode)
extension: .php
fastcgi.spawn: "PHP_FCGI_CHILDREN=10 exec /usr/bin/php-cgi"

access-log: /path/to/the/access-log
error-log: /path/to/the/error-log
pid-file: /path/to/the/pid-file
http2-reprioritize-blocking-assets: ON # performance tuning option

希望这有助于...

关于ruby - 如何为 WordPress 多站点编写 h2o webserver mruby 处理程序?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39273185/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com