Page 1 of 1

Update Overwrites HTACCESS File

Posted: 05 Apr 2019, 16:04
by spiresvideo
When using the Panel's Update Function, it overwrites current HTACCESS file.
It would be helpful to either opt out of this file upon update or offer a merge and append to the current file, if different from previous build.

Re: Update Overwrites HTACCESS File

Posted: 05 Apr 2019, 23:43
by mjau-mjau
The X3 .htaccess file isĀ made FOR X3 and thus must also be included in X3 updates, overwriting previous (outdated) X3 htaccess file. I wish things could be different, but as you must understand, we must update this file. Ultimately (though unrealistically), you should not be adding your own custom rules into X3's .htaccess file, because this is basically like editing X3 application files and expecting them to merge on update. You should be able to apply custom rules from your hosting options instead of using htaccess .May I ask what kinda custom rules you have there?

There is already a way to merge custom rules, something that is already noted at the top of the X3 htaccess file:
Code
# ---------------------------------------------------------------------------
# X3 REQUIRED
# Below rewrite rules are strictly required by X3 for pages to work properly.
# Add custom rules inside "# custom rules start" and "# custom rules end" tags.
# ---------------------------------------------------------------------------

So for example:
Code
# custom rules start
(YOUR RULES HERE)
# custom rules end
Whatever exists inside the tags, will be migrated to the updated .htaccess file.