red*_*war 9 ruby wordpress server-configuration mruby h2o-http
这就是Apache所需要的.我想知道如何在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]
Run Code Online (Sandbox Code Playgroud)
//在这个btw上浪费了300点声望.
小智 -1
基本上,您的 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
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助...
| 归档时间: |
|
| 查看次数: |
392 次 |
| 最近记录: |