futuremindtraining Posted February 7, 2011 Share Posted February 7, 2011 Hi does anybody have any tips on the htaccess file code to use with 1 and 1 hosting?at present the current stored .ht stops the shop from functioningany help is thanks in advance Link to comment Share on other sites More sharing options...
scottyboy Posted February 8, 2011 Share Posted February 8, 2011 I'm with 1and1 and my htaccess file works with friendly url. Are you on a shared host server? Link to comment Share on other sites More sharing options...
futuremindtraining Posted February 8, 2011 Author Share Posted February 8, 2011 i may have a different ht access file? im unsure?do you have a copy of your file that i can check against mine?im using the one which came as standard and when i click generate my screen turns white untill i convert it back to the ole onei cant speak highly enough of prestashop and if this could work id be made up! heres the current one before it gets generated (if that changes it i dont know??AddType x-mapp-php5 .html .htm .php# URL rewriting module activationRewriteEngine onRewriteCond %{REQUEST_METHOD} !^(TRACE|TRACK|GET|POST|HEAD)$RewriteRule .* - [F]RewriteBase /Options +FollowSymLinks# URL rewriting rulesRewriteRule ^([a-zA-Z0-9-]*)/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$2$4 [L,E]RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ product.php?id_product=$1$3 [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]# Catch 404 errorsErrorDocument 404 /404.php Link to comment Share on other sites More sharing options...
scottyboy Posted February 8, 2011 Share Posted February 8, 2011 This works without any problems: # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution # http://www.prestashop.com - http://www.prestashop.com/forums AddType x-mapp-php5 .php # 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 [L,E] RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/([_a-zA-Z0-9-]*)\.jpg$ /img/c/$1$2.jpg [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 [L,E] RewriteRule ^lang-([a-z]{2})/([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$2&isolang;=$1$4 [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 [L,E] RewriteRule ^([0-9]+)\-([a-zA-Z0-9-]*)\.html(.*)$ /product.php?id_product=$1$3 [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] Link to comment Share on other sites More sharing options...
futuremindtraining Posted February 9, 2011 Author Share Posted February 9, 2011 i may need bit more help if i could ask aain please?i copied your file and enabled the friendly url and it made me generate a file (which shuts the shop down)so i transfered the file you listed above but when i ftp it, it disables the friendly url back to what it was?Any suggestions? Link to comment Share on other sites More sharing options...
futuremindtraining Posted February 9, 2011 Author Share Posted February 9, 2011 sorry i may be making an error here i have just looked again and noticed the required robots.txt fileis this a reason the friendly url is not working? 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