Andrejkov Posted January 8 Share Posted January 8 Hi, I have question about generating htaccess file. In file i need to add new RewriteRule in section: #Domain: mydomain.com RewriteRule . - [E=REWRITEBASE:/]RewriteRule .* - MY NEW REWRITE RULE RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] RewriteRule ^upload/.+$ %{ENV:REWRITEBASE}index.php [QSA,L] But problem is that when i will now generate new .htaccess file via backoffice this rule are gone. How to make that this rule will be generated also. I can't put this code outside this comment in file # ~~end~~ because rule will be doesnt work from this place. Regards. Link to comment Share on other sites More sharing options...
Nickz Posted January 8 Share Posted January 8 Don't you have ftp access? Link to comment Share on other sites More sharing options...
Andrejkov Posted January 16 Author Share Posted January 16 Hi, Yes i have FTP access but when i put this Rewrite Rule manually its works couple days until file will be re-generated automatically(then this rule are gone). The question is how to add this rule so that it is added automatically during re-generated automatically file. Regards. Link to comment Share on other sites More sharing options...
JBW Posted January 16 Share Posted January 16 1 hour ago, Andrejkov said: The question is how to add this rule so that it is added automatically during re-generated automatically file. Why is it regenerated so frequently? Usually the file should be stable unless you trigger regeneration or do upgrades. You can try to change its chmods to have it protected for changes. 1 Link to comment Share on other sites More sharing options...
justmeagain Posted January 16 Share Posted January 16 Silly question - where in your .htaccess file are you putting it? It does say at top # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again and then at bottom # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now