xfdisco Posted July 9, 2015 Share Posted July 9, 2015 (edited) [solved] We've installed Prestashop 1.6.1.0 on a virtual Ubuntu machine. It is accessible by a subdomain. After activating the user-friendly urls we figured out that this installation has no htaccess file and it isn't generated by switching user-friendly urls on and off.mod_rewrite ist activated. Does anyone have an idea why this file isn't generated? Everthing else seems to work fine. Thanks in advance! T Edited July 13, 2015 by xfdisco (see edit history) Link to comment Share on other sites More sharing options...
selectshop.at Posted July 9, 2015 Share Posted July 9, 2015 If the file is missing, so please add an empty file called .htacess to the root folder of your shop. After you can try to override this file by changing the URL to friendly. .htaccess file is only added once (when you install Prestashop). If this file was not added, or deleted, so you must add it manually again as empty file. Link to comment Share on other sites More sharing options...
xfdisco Posted July 9, 2015 Author Share Posted July 9, 2015 Many thanks for the tip! Just now our Prestashop told us that tip also. But it didn't work. At the moment we are not sure if we really can see the htaccess. Maybe hidden files are not shown to this ftp user or the owner is root. I'll send feedback soo. Link to comment Share on other sites More sharing options...
xfdisco Posted July 9, 2015 Author Share Posted July 9, 2015 Ok, the htaccess is there and it is not empty # ~~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: shop.x-floc.com RewriteRule . - [E=REWRITEBASE:/] RewriteRule ^api$ api/ [L] RewriteRule ^api/(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L] # Images RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L] RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L] 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] 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] 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] 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] 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] 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] RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L] 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/x-font-woff .woff <IfModule mod_headers.c> <FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$"> Header add Access-Control-Allow-Origin "*" </FilesMatch> </IfModule> #If rewrite mod isn't enabled ErrorDocument 404 /index.php?controller=404 # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again But the url rewriting does not work. We can load the main page when we switch off canonical url forwarding. The subpages (product categories, CMS sites) do not work. We haven't imported articles yet. Is there something wrong with our htaccess or do we need to make changes because we have a self-installed machine? Link to comment Share on other sites More sharing options...
selectshop.at Posted July 11, 2015 Share Posted July 11, 2015 If URL rewriting is not working, so your server has no mod_rewrite module installed. You should contact your provider, or if you are managing your server you should install this php-module with server admin privileges on the root of your server. Link to comment Share on other sites More sharing options...
xfdisco Posted July 13, 2015 Author Share Posted July 13, 2015 We found the problem. But it could only be solved by a setting in Filezilla in the menu server. There is an option to force the server to show hidden files.Url rewriting works also now. 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