where to put wordpress htaccess on openshift

Solution:1

If you used our official quickstart, you would need to use an action_hook (probably deploy) to copy a .htaccess file into place, otherwise the files are actually not stored in a place that is affected by git. You could also try using this quickstart( https://github.com/openshift-quickstart/openshift-wordpress-developer-quickstart) where EVERYTHING except for uploads, is stored in git (plugins, themes, etc)

Solution:2

Create (and git add) a .htaccess in the .openshift/config directory. The deploy action_hook will copy it to the correct directory (/app-root/data/current) at deployment.

Solution:3

the .htaccess should go in the root directory of your application instead of the /php folder. For example:

wordpress git:(master) ls -la
total 32
drwxr-xr-x  11 User  staff   374 Aug 13 17:03 .
drwxr-xr-x   4 User  staff   136 Aug 13 16:56 ..
drwxr-xr-x  13 User  staff   442 Aug 13 17:07 .git
-rw-r--r--   1 User  staff     9 Aug 13 16:56 .gitignore
-rw-r--r--   1 User  staff   333 Aug 13 17:03 .htaccess
drwxr-xr-x  11 User  staff   374 Aug 13 16:56 .openshift
-rw-r--r--   1 User  staff  2130 Aug 13 16:56 README
-rw-r--r--   1 User  staff  2190 Aug 13 16:56 README.md
drwxr-xr-x   3 User  staff   102 Aug 13 16:56 libs
drwxr-xr-x   3 User  staff   102 Aug 13 16:56 misc
drwxr-xr-x   3 User  staff   102 Aug 13 16:56 php