sadiceramiche Posted May 19, 2020 Share Posted May 19, 2020 hi, I moved the site locally with xampp into a web hosting, after configuring the .php file and the database adjusting url and domain, my site only shows the home page, all the other links have the old local path "localhost / presta / " how can I fix this please? Link to comment Share on other sites More sharing options...
PrestaServicePro Posted May 20, 2020 Share Posted May 20, 2020 Hello, Did you tried to cache? After that try to clear cache of browser too and try again. Thanks. Link to comment Share on other sites More sharing options...
sadiceramiche Posted May 20, 2020 Author Share Posted May 20, 2020 Yes, I cleaned the prestashop and browser cache. My host reported an error in the .htacess file this file has the path of the site locally, but I don't know what to fix # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums <IfModule mod_rewrite.c> <IfModule mod_env.c> SetEnv HTTP_MOD_REWRITE On </IfModule> RewriteEngine on #Domain: localhost RewriteRule . - [E=REWRITEBASE:/presta/] RewriteRule ^api(?:/(.*))?$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L] RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L] RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L] RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L] RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L] RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L] RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L] # AlphaImageLoader for IE and fancybox RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L] # Dispatcher RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L] </IfModule> AddType application/vnd.ms-fontobject .eot AddType font/ttf .ttf AddType font/otf .otf AddType application/font-woff .woff AddType font/woff2 .woff2 <IfModule mod_headers.c> <FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|svg)$"> Header set Access-Control-Allow-Origin "*" </FilesMatch> </IfModule> #If rewrite mod isn't enabled ErrorDocument 404 /presta/index.php?controller=404 # ~~end~~ Do not remove this comment, Prestashop will keep automatically t the site is in the main root public_html Link to comment Share on other sites More sharing options...
PrestaServicePro Posted May 21, 2020 Share Posted May 21, 2020 Hello, In this case, follow my steps. 1) Enter SEO page of the shop (in BO), 2) Disable "friendly url". 3) Enter folders list of PrestaShop. 4) Rename current ".htaccess" filename. 5) Clear cache of shop and again enable "frienly url" It should work. Let me know about the result. If you want i can check it for you too. Link to comment Share on other sites More sharing options...
jetway Posted May 21, 2020 Share Posted May 21, 2020 (edited) The Problem is very simple: #Domain: localhost The domain points to localhost but should point to your domain. it should most likely be: #Domain: www.yourdomain.com Every part of the .htaccess file that points to localhost needs to be updated to www.yourdomain.com. Looking at your images section, every entry there needs an update. RewriteCond %{HTTP_HOST} ^localhost$ needs to be RewriteCond %{HTTP_HOST} ^www.yourdomain.com$ Another Issue is: RewriteRule . - [E=REWRITEBASE:/presta/] That actually only works if your prestashop installation is in the folder /presta. If not it should look like this RewriteRule . - [E=REWRITEBASE:/] Edited May 21, 2020 by jetway (see edit history) 1 Link to comment Share on other sites More sharing options...
sadiceramiche Posted May 21, 2020 Author Share Posted May 21, 2020 (edited) thank you friends, the solution has almost worked. I had stuck the Bo I fixed it with deleting the / var / cache / content (/ dev and / prod) folders. to be sure that the file: htacces is perfect, I made it empty inside my hosting space, I loaded and installed prestashop, after I changed only the folders of my prestashop with the new ones (without changing APP and ADMINxxxxx) do not copy local database in hosting space, use that of the new installation and everything works without changing permissions just cancel DEV and PROD. Now I try to redo the whole sequence to be sure that I have written all the steps with precision. PS: as I change the title of the post in solved Edited May 21, 2020 by sadiceramiche modify title (see edit history) Link to comment Share on other sites More sharing options...
PrestaServicePro Posted May 21, 2020 Share Posted May 21, 2020 Congratulations! 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