在Red Hat OpenShift通字preSS的.htaccess [英] WordPress .htaccess on Red Hat OpenShift PaSS

查看:102
本文介绍了在Red Hat OpenShift通字preSS的.htaccess的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发使用Word preSS上OpenShift网站。一切正常,除了我的.htaccess文件。每当我推code使用Git,.htaccess文件变为空白。即使我把.htaccess文件从我的计算机通过的Git。这意味着我必须重新配置pretty的永久链接每次我通过混帐推更改。

I'm developing a website using Wordpress on OpenShift. All is ok, except my .htaccess file. Every time I push code using Git, the .htaccess file becomes blank. Even if I push an .htaccess file from my computer through Git. This means that I have to re-configure pretty permalinks every time I push changes via Git.

我试过ssh方式连接到服务器的目录的/ var / lib中/ stickshift / XXXXXXXX /应用程序根/回购/ PHP - 事实上,在我推任何code中的.htaccess文件是否正确填充。那一刻我通过推的Git(即使这包括从我的电脑.htaccess文件),该文件是空的。什么

I tried SSHing into the server in the directory /var/lib/stickshift/xxxxxxxx/app-root/repo/php - and indeed, before I push any code the .htaccess file is properly populated. The minute I push anything via Git (even when this includes the .htaccess file from my computer) the file is blank.

我不知道 - 也许确实OpenShift存储.htaccess文件在其他地方?但是,如果是这样,为什么会重新设置我每次推新的code?

I'm wondering - perhaps does OpenShift store the .htaccess file somewhere else? But if so, why would it re-set every time I push new code?

如果可能的话,我不希望.htaccess文件移动到我无法通过的Git访问的位置 - 因为它可能需要在未来进行更新

If possible, I wouldn't like to move the .htaccess file to a location where I can't access via Git - since it may need to be updated in the future.

如果有人遇到了这个问题,并遇到一个解决方案,任何帮助/洞察力将大大AP preciated。

If anyone has encountered this issue and has come across a solution, any help/insight would be greatly appreciated.

问候,

伊恩

推荐答案

如果您使用的是默认的文字preSS的OpenShift现在是自动的。照片 只需创建(和git添加).htaccess文件到您的.openshift / config目录。
部署action_hook将它复制到正确的目录(/应用程序根/数据/电流)的部署。

If you are using the default wordpress for OpenShift it is automagic now.
Just create (and git add) the .htaccess file to your .openshift/config directory.
The deploy action_hook will copy it to the correct directory (/app-root/data/current) at deployment.

这篇关于在Red Hat OpenShift通字preSS的.htaccess的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆