解决因Caddy 伪静态规则引起 TeStore 插件页面404

TeStore插件我装了几回了,总是404,于是我就放到本地测试,没问题啊,仔细观察地址 http://localhost/index.php/admin/te-store/market ,诶,怎么是index.php返回的请求啊,那怪不得,我的伪静态规则是仿 WordPress 改写到 Typecho 的。

WordPress的规则是:

  rewrite {
    if {path} not_match ^\/wp-admin
    to {path} {path}/ /index.php?{query}
  }

原来的Typecho规则

  rewrite {
    if {path} not_match ^\/admin
    to {path} {path}/ /index.php{path}
  }

好吧,不管admin就行了

  rewrite {
    to {path} {path}/ /index.php{path}
  }

不过新问题又来了

Class 'DOMDocument' not found
Error: Class 'DOMDocument' not found in /var/www/html/site_blog/usr/plugins/TeStore/Action.php:107
Stack trace:
#0 /var/www/html/site_blog/usr/plugins/TeStore/views/market.php(4): TeStore_Action->getPluginData()
#1 /var/www/html/site_blog/usr/plugins/TeStore/Action.php(189): include_once('/var/www/html/si...')
#2 /var/www/html/site_blog/var/Typecho/Router.php(138): TeStore_Action->market()
#3 /var/www/html/site_blog/index.php(23): Typecho_Router::dispatch()
#4 {main}

Typecho

这次是腾讯云的锅

发表评论

;-) :| :smile: :sad: :razz: :oops: :o :lol: :grin: :cry: :cool: :???:

评论列表(3条)

解决因Caddy 伪静态规则引起 TeStore 插件页面404
04/14
2020
TeStore插件我装了几回了,总是404,于是我就放到本地测试,没问题啊,仔细观察地址 ht...
扫描右侧二维码阅读全文