Vinix Posted September 7, 2017 Share Posted September 7, 2017 Hello,I accidentally changed base url in my prestashop backoffice. I believe that I used all the ways to solve the problem, so I decided to write this post, I hope someone will be able to help me.Version: 1.6.What i do already?1) define('__PS_BASE_URI__', '/'); in the /config/settings.inc.php 2) rewrite physical_uri to "/" in DB table - ps_shop_url 3) clear cache (cache/compile) in cache/smarty4) upload old .htacces file (backup when all else worked) in new .htacces frontoffice generate 500 error.After all steps: frontoffice was working (not tested all) for now, but i can't login to backoffice i write login and password, after 2 seconds nothing happen, login and password input was clear. Any idea how i can fix it? And what i can change more? It is any possibility to generate .htaccess manualy? When i delete .htaccess url was still like that www.example.com/example/ (that "/example/" was base url) and generate 404 not found. I will be grateful for any helpBest. Link to comment Share on other sites More sharing options...
joseantgv Posted September 8, 2017 Share Posted September 8, 2017 Hello, I accidentally changed base url in my prestashop backoffice. I believe that I used all the ways to solve the problem, so I decided to write this post, I hope someone will be able to help me. Version: 1.6. What i do already? 1) define('__PS_BASE_URI__', '/'); in the /config/settings.inc.php 2) rewrite physical_uri to "/" in DB table - ps_shop_url 3) clear cache (cache/compile) in cache/smarty 4) upload old .htacces file (backup when all else worked) in new .htacces frontoffice generate 500 error. After all steps: frontoffice was working (not tested all) for now, but i can't login to backoffice i write login and password, after 2 seconds nothing happen, login and password input was clear. Any idea how i can fix it? And what i can change more? It is any possibility to generate .htaccess manualy? When i delete .htaccess url was still like that www.example.com/example/ (that "/example/" was base url) and generate 404 not found. I will be grateful for any help Best. To regenerate .htaccess you have to disable/enable rewrite URLs in "Preferences -> SEO & URLs". About your BO problem, have you tried to remove cookies? Link to comment Share on other sites More sharing options...
Vinix Posted September 8, 2017 Author Share Posted September 8, 2017 Hello,Thanks for reply, as i say i can't login at this moment to BO: After all steps: frontoffice was working (not tested all) for now, but i can't login to backoffice I tried, but im sure it's base url problem, all the way i have www.example.com/example/ (example was baseUrl), FO start working after add "define('__PS_BASE_URI__', '/'); in the /config/settings.inc.php". Link to comment Share on other sites More sharing options...
Scully Posted September 8, 2017 Share Posted September 8, 2017 Changing files is not the way how to change the base URL. It is only done by backoffice => SEO and URL settings. Revert back your change in /config/settings.inc.php Link to comment Share on other sites More sharing options...
Vinix Posted September 8, 2017 Author Share Posted September 8, 2017 @ScullyThanks for reply but if I do not have access to BO i must try do it by FTP. If u give me any tips how i can fix BO login i revert changes on SEO and URL settings.Best. Link to comment Share on other sites More sharing options...
Scully Posted September 8, 2017 Share Posted September 8, 2017 You can make a direct change into the database if you backoffice does not work. However prior to that I recommend to revert changes in your .php files you might have made. The tables relevant for the change are: ps_shop_url => fields domain and domain_ssl => no protocol prefix => example: mydomain.com => field physical_url => example: / ps_configuration => keys: PS_SHOP_DOMAIN and PS_SHOP_DOMAIN => same values in ps_shop_url Link to comment Share on other sites More sharing options...
Vinix Posted September 8, 2017 Author Share Posted September 8, 2017 (edited) @Scully I made these changes before I posted a forum post. Without expected changes.. Any other ideas?Best. Edited September 8, 2017 by Vinix (see edit history) Link to comment Share on other sites More sharing options...
Scully Posted September 8, 2017 Share Posted September 8, 2017 remove your .htaccess file and try again. and btw: There are so many threads explaining how to change the URL wihout any hassle. But once one a wrong path it can get difficult. Link to comment Share on other sites More sharing options...
Vinix Posted September 8, 2017 Author Share Posted September 8, 2017 (edited) @ScullyDid you read my first post? I already to it. I read many threads and no solution had the expected effect. When i delete .htaccesss file i can't regenarate it (manually) without access to BO.Best. Edited September 8, 2017 by Vinix (see edit history) Link to comment Share on other sites More sharing options...
Scully Posted September 8, 2017 Share Posted September 8, 2017 First step is beeing able to log in again. For this you don't need the .htaccess at all. Tested many times. But probably your issue isn't related to .htaccess but some totally other cause. Link to comment Share on other sites More sharing options...
Scully Posted September 11, 2017 Share Posted September 11, 2017 Is this issue solved meanwhile? If yes, add 'SOLVED' to your topic title. Link to comment Share on other sites More sharing options...
Vinix Posted September 14, 2017 Author Share Posted September 14, 2017 (edited) Sorry, I did not have time to take care of the site. Problem was still not solved, for now i have some time to fix it. You can make a direct change into the database if you backoffice does not work. However prior to that I recommend to revert changes in your .php files you might have made. The tables relevant for the change are: ps_shop_url => fields domain and domain_ssl => no protocol prefix => example: mydomain.com => field physical_url => example: / ps_configuration => keys: PS_SHOP_DOMAIN and PS_SHOP_DOMAIN => same values in ps_shop_url I check again your soltuion, all right in my DB. Also i revert changes on:define('__PS_BASE_URI__', '/'); in the /config/settings.inc.php Also deleted .htaccess, still can't get access to BO. When i write right acc & pass site reloading for 2-3 seconds and all inputs was clear. When i write wrong acc & pass i see:"There is 1 error. The Employee does not exist, or the password provided is incorrect."So i have connection with DB. After delete .htaccess and revert changes in /config/settings.inc.php i don't have access to FO, site URL was still bad, https://example.com/example.com/ and i see this communicate:"Not Found The requested URL /example.com/ was not found on this server."Console errors (login in BO):With .htaccess (/var/www/prestashop/) Without .htaccess Tested in google chrome, firefox, opera. Any ideas? @EditI also tried old solution from this topic:https://www.prestashop.com/forums/topic/240899-uncaught-referenceerror-jquery-is-not-defined/Without good results.Regards. Edited September 14, 2017 by Vinix (see edit history) Link to comment Share on other sites More sharing options...
Vinix Posted September 18, 2017 Author Share Posted September 18, 2017 @Refresh, anyone please? Link to comment Share on other sites More sharing options...
Scully Posted September 18, 2017 Share Posted September 18, 2017 Your javascript isn't loading for some reason. Difficult to say what went wrong with all this changes. Link to comment Share on other sites More sharing options...
Vinix Posted September 18, 2017 Author Share Posted September 18, 2017 I think beacuse client cannot GET https://example.com/example.com/js/jquery/jquery-1.11.0.min.js etc.. I think it's still base url problem.. Link to comment Share on other sites More sharing options...
Scully Posted September 18, 2017 Share Posted September 18, 2017 1. Read out your webservers error logfile. 2. Manually delete cache files. 3. Post real URL Link to comment Share on other sites More sharing options...
tino01 Posted March 29, 2020 Share Posted March 29, 2020 On 9/18/2017 at 9:06 PM, Scully said: Your javascript isn't loading for some reason. Difficult to say what went wrong with all this changes. @Scully hi Scully, I read your information on this topic. I messed up similarly. I really hope you can help me, as I changed the base url in backoffice by accident and now shop is gone and I cannot login to admin BO anymore 😞 Where can I undo this or rectify this (I have ftp access to my files) - I am using prestashop 1.7 - so the /config/settings.inc.php is deprecated ... sorry to bother you, but I'm in desperate search for help. thanks alot 1 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