Jump to content

How to generate .htaccess file in prestashop 1.5.x


Recommended Posts

  • 1 month later...
  • 1 month later...
  • 1 month later...

The reason is that you don't need to generate a .htaccess manually with the 1.5 version. The .htaccess file is automatically created / updated when you use friendly urls or multistore, and will save all the specific code that you put in your file.

 

Hi Guys,

 

I have tried a couple of things you have suggested but i am not seeing the .htaccess file on my server. Does that mean it has not worked correctly? Would this have an affect on why i cannot now create new users on my store?

 

Regards

Link to comment
Share on other sites

Hi Guys,

 

I have tried a couple of things you have suggested but i am not seeing the .htaccess file on my server. Does that mean it has not worked correctly? Would this have an affect on why i cannot now create new users on my store?

 

Regards

 

when you look at it from ftp, make sure your ftp program settings are set to 'show hidden files'

Link to comment
Share on other sites

when you look at it from ftp, make sure your ftp program settings are set to 'show hidden files'

 

Hi! I just ticked the last few boxes in Dreamweaver to see them but it made no difference. I can see then in DW on my local files but not on the server

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

well this solution was at version 1.4

 

terrible mistake to take it off!!!! =[

 

I wrote a module that improves upon the 1.4 native feature. Where in 1.4 you could only add to the top of the native .htaccess, my module allows you to prefix and suffix the native PrestaShop.

 

And for those that want to regenerate their native PS .htaccess, on-demand (yes we know you are out there) we have that button does that as well. :)

 

Module forum post:

http://www.prestashop.com/forums/topic/213570-module-prestashop-15-customize-htaccess/

 

Module Home:

http://www.etiendas.co/en/42-prestashop-15-customize-htaccess.html

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

in old domain use 301 redirection in .htaccess :)

 

301 redirects to new domain (and this is good for seo) like:

 

domain.com/1-product.html

new.com/1-product.html

 

in this case you have to copy database to new shop.

Link to comment
Share on other sites

in old domain use 301 redirection in .htaccess :) 301 redirects to new domain (and this is good for seo) like: domain.com/1-product.html new.com/1-product.html in this case you have to copy database to new shop.
You mean I have to create separate redirects for all my products separately?
Link to comment
Share on other sites

if you use the same structure for categories, products etc.

you can use this redirection:

 

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

 

 

with this .htaccess rule you don't have to redirect urls one by one :)

  • Like 1
Link to comment
Share on other sites

if you use the same structure for categories, products etc. you can use this redirection:
 Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] 

with this .htaccess rule you don't have to redirect urls one by one :)

There is some error in my htaccess file now - the old site stopped working ... only the main page displays, all other result in 404 :(

p.s. not all the categories all the same, but all categories and products from the old site are identical to the ones on the new one...

Edited by FountainPenMarket (see edit history)
Link to comment
Share on other sites

What do you mean "old content"?

Do I need to erase all the contents in my htaccess file and replace it with what you suggested?

 

Just noticed the word "database" in your first answer ... Since the second domain uses the first domain's database ... I'm not sure what to think :(

Edited by FountainPenMarket (see edit history)
Link to comment
Share on other sites

you want to move your store:

 

domain.com -> new-domain.com

 

1) without database change

2) without hosting change

 

if so - you need to change ps_shop_url table (preferences > SEO & URLs) values: domain & URI.

then, create new directory (not in prestashop dir) and point your old domain there. in this dir create .htaccess file with 301 redirection.

Link to comment
Share on other sites

Both domains are part of a Prestashop Multistore. They both share the same database. I decided to merge them into one store and enabled all categories from first one to the other. Now I'm afraid from duplicate content penalty and still want to receive traffic white the imported categories and products from the first domain get indexed. I've read about the option you suggested (

Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] )

, but unfortunately I can't get it work. There is probably some redirect from the multistore preventing this to work properly.

Link to comment
Share on other sites

unfortunately, with multistore this trick will not work :(

Luckily This Trick WORKS like a Charm! Thank you! Besides adding the rewrite mod to .htaccess you just need to create 301 redirect on CPanel in order the mod to work .... It's that easy(when you spend a day searching and trying ... ) Thanks again! Supports Multistore too.
Link to comment
Share on other sites

  • 1 month later...

Enabling Friendly URL generates .htaccess

 

"Preferences > SEO & URLs - Friendly URL - Set to Yes"

 

I have just deleted my .htaccess, disabled and then enabled SEF URLs and it generated a .htaccess for me.

 

Hope this helps...

 

Thanks for this information. You are a life saver :-)

Link to comment
Share on other sites

  • 2 months later...

can any one help me

 

How can i redirect - "myadmin.com/he/" to

"myadmin.com" ?

HI,

 

You visit this topic.

http://www.prestashop.com/forums/topic/251581-aporte-redireccion-pagina-no-encuentra-error-404-al-quitar-desinstalar-un-idioma/

 

is for 1.4.x, in the las topics you have for 1.5.x

rediret for example:

http://ropika.es/en/index.php

to

http://ropika.es/index.php

 

I hope is solution to you

Regards.

Link to comment
Share on other sites

  • 2 weeks later...
×
×
  • Create New...