mokers Posted October 19, 2010 Share Posted October 19, 2010 I know I have apache on my server, but for some reason, prestashop is not able to create an .htaccess file. after I enable friendly urls, I get no option to generate the .htaccess file. Are the default .htaccess settings listed somewhere? I don't mind editing the file myself, but I don't know what it's contents should be.Thanks,Joe Link to comment Share on other sites More sharing options...
rocky Posted October 19, 2010 Share Posted October 19, 2010 Did you upload a blank .htaccess file with chmod 666 permissions to the root directory of PrestaShop on your server? The "Generate .htaccess file" button won't appear until you have. Link to comment Share on other sites More sharing options...
mokers Posted October 19, 2010 Author Share Posted October 19, 2010 I uploaded a blank .htaccess and modified the permissions correctly. I was able to do the robots.txt file without a problem. Link to comment Share on other sites More sharing options...
rocky Posted October 19, 2010 Share Posted October 19, 2010 That's weird that you can generate a robots.txt file, but not a .htaccess file. Here's the default .htaccess file in PrestaShop v1.3.2, assuming the shop is in the root directory: # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums # URL rewriting module activation RewriteEngine on # URL rewriting rules RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2$3.jpg [QSA,L,E] RewriteRule ^([0-9]+)\-([0-9]+)/([_a-zA-Z0-9-]*)\.jpg$ /img/p/$1-$2.jpg [QSA,L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [QSA,L,E] RewriteRule ^lang-([a-z]{2})/([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$3&isolang;=$1$5 [QSA,L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [QSA,L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$2&isolang;=$1 [QSA,L,E] RewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2$4 [QSA,L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 [QSA,L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /category.php?id_category=$1 [QSA,L,E] RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*)(.*)$ /cms.php?id_cms=$1 [QSA,L,E] RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*)(.*)$ /supplier.php?id_supplier=$1$3 [QSA,L,E] RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*)(.*)$ /manufacturer.php?id_manufacturer=$1$3 [QSA,L,E] RewriteRule ^lang-([a-z]{2})/(.*)$ /$2?isolang=$1 [QSA,L,E] # Catch 404 errors ErrorDocument 404 /404.php If your shop is in a subdirectory, you will need to add the subdirectory before the / near the end of each line. Link to comment Share on other sites More sharing options...
JOYE Posted November 2, 2010 Share Posted November 2, 2010 same problem here. can anyone please rewrite the default .htaccess for me if my shop`s subdirectory is htdocs cos I don`t know were to put it having this issue listed above Link to comment Share on other sites More sharing options...
JOYE Posted November 2, 2010 Share Posted November 2, 2010 solved...turned out my htdocs was the main catalog and it worked just fine Link to comment Share on other sites More sharing options...
curtdonohue Posted November 13, 2010 Share Posted November 13, 2010 I created a video to walk through the process of enabling friendly URLs, creating the blank .htaccess file, and uploading that file to the web host. You can view the video at the following address: http://www.prestatraining.com/create-prestashop-htaccess-file/I hope this helps! Link to comment Share on other sites More sharing options...
20bekhar Posted December 30, 2019 Share Posted December 30, 2019 Hi my htaccess is contain this line. could you please what dose it mean? #If rewrite mod isn't enabled ErrorDocument 404 /index.php?controller=404 after a time there are not any 404 error in webmaster and I do not why. I had over 100 link 404 errors in webmaster and I redirect them by redirect module. for a reason I enabled the module and It means the redirects stops but there are not any 404 showing in webmaster yet. please help me. 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