michaelmcandrew / civicrm-docker

This is a read only copy. Please make PRs here: https://lab.civicrm.org/michaelmcandrew/civicrm-docker
https://lab.civicrm.org/michaelmcandrew/civicrm-docker
14 stars 11 forks source link

WordPress .htaccess is hard coded - autogenerate instead #2

Open michaelmcandrew opened 5 years ago

michaelmcandrew commented 5 years ago

We are currently 'hard-coding' the .htaccess file here: https://github.com/michaelmcandrew/civicrm-docker/blob/5f4c24fb1d4b130c71b71c0f4a0945c51a3ae773/wordpress/Dockerfile#L30

It seems like WordPress generates this file (not sure how but I think maybe in wp-admin/includes/network.php or wp-includes/class-wp-rewrite.php) at some point (including on save of the wp-admin/options-permalink.php page).

Might be better to detect that it is not present and auto-generate it instead, in case for whatever reason the hard coded one that we have created is not appropriate.

michaelmcandrew commented 5 years ago

Or alternatively, we mount it as a volume but that seems slightly insane :)