小编oky*_*net的帖子

如何在MODX中配置404错误页面?

http://www.example.com/test1
http://www.example.com/test2
http://www.example.com/test3
Run Code Online (Sandbox Code Playgroud)

所有这些都是不存在的页面并重定向到index.php页面,搜索引擎将这些链接标记为重复,它们返回200 ok,如何让它们返回404找不到?

使用modX cms

php modx

2
推荐指数
1
解决办法
5910
查看次数

Git站点部署 - post-receive hook中的checkout无效

我已经按照本教程"使用Git管理网站",使用Tower提交并将我的本地存储推送到远程服务器.通过以下消息推送成功:

Pushing to ssh://user@mysite.com/~/git/tprevo.git
stdin: is not a tty
Counting objects: 40, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (37/37), done.
Writing objects: 100% (40/40), 171.95 KiB, done.
Total 40 (delta 3), reused 0 (delta 0)
To ssh://user@mysite.com/~/git/tprevo.git
 * [new branch]      master -> production
updating local tracking ref 'refs/remotes/production/production'

Successfully created tracking connection.
Run Code Online (Sandbox Code Playgroud)

我已经验证我的post-receive挂钩正在执行,但该checkout命令没有将推送的代码添加到我认为我已设置为我的工作目录的内容中.我一直试图弄清楚这一点.

后得到:

#!/bin/sh
GIT_WORK_TREE=/home/tprevo/public_html/tprevo git checkout -f
Run Code Online (Sandbox Code Playgroud)

我是Git的新手,非常热衷于学习.调试这个的最佳方法是什么?

git repository git-checkout git-post-receive

0
推荐指数
1
解决办法
2501
查看次数

标签 统计

git ×1

git-checkout ×1

git-post-receive ×1

modx ×1

php ×1

repository ×1