Search…

X3 Photo Gallery Support Forums

Search…
 
spiresvideo
Topic Author
Posts: 4
Joined: 25 Feb 2019, 10:32

Update Overwrites HTACCESS File

05 Apr 2019, 16:04

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.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Update Overwrites HTACCESS File

05 Apr 2019, 23:43

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.