falcon
falcon copied to clipboard
🐛 [BUG] - The changes in the Htaccess file, made by is_themecore, delete any changes made by other modules or customizations
Description
Hi I report a problem with is_themecore. When it does some updates into htaccess remove all extra code present at the top of htaccess
in some case there are extra modules like scaledevmanomano that add some directives or in some cases I use
RewriteEngine on RewriteBase / RewriteRule ^shop/(.*)$ /$1 [R=301,NC,L]
because the website was inside the folder "shop"
each time I do some changes into is_themecore or from prestashop seo page, I need to add again that code inside htaccess. Without is_themecore I don't get this problem
Is it possible to reduce the range of action inside the Htaccess file?
thanks
Node.js version
v16
php version
8.1
OS and it's version
linux
Browsers
Chrome
Required module/theme
is_themecore
Reproduction steps
1. Go to htaccess and add an extra code at the top of it
2. push on the save button inside the is_themecore configuration page
Logs
No response
Hi @maofree,
thank you for creating an issue.
I was able to reproduce the problem. I am adding this issue to is_themecore module roadmap.
We are not writing contentBefore
during generation process.
You can add here this code here
$this->write($this->contentBefore);
This should resolve your problem.
Hi yes now that problem is fixed, but I've seen another little problem in that htaccess regeneration at each saving (pushing inside the module configuration) it adds a new line at the start and a new line at the end
from one line, after two saving there are 3 lines
Hi @maofree,
I will take a look at this when I work on is_themecore
v5.
TBH it's not a big deal just a new line, it doesn't break anything, so it's like a minor problem.