Jump to content

[solved] How to change shop from subdirectory to root


Recommended Posts

Hi,

I created a site in a subdirectory, e.g. www.domain.com/prestashop. Everything is working fine and the shop is ready to go live.
But I want to transfer my shop form the /prestashop directory to the www.domain.com root.

1) I copied all the files from /domains/domain.com/public_html/prestashop into the /domains/domain.com/public_html,

2) I changed Preferences > PS folder to / instead of /prestashop/,

3) I changed the file settings.inc.php

define('__PS_BASE_URI__', '/prestashop/'); to define('__PS_BASE_URI__', '/');


Admin, categories and product pages are accessible. But www.domain.com and /...php pages are not shown.


This is my .htaccess:

# URL rewriting module activation
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.domain\.nl [NC]
RewriteRule ^(.*)$ http://www\.domain\.nl/$1 [L,R=301]

# 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]

# Catch 404 errors
ErrorDocument 404 /404.php




IE says error 500 internal server error.

What else do I have to change to fix this?

I hope somebody knows the answer. I would be very grateful!!

Link to comment
Share on other sites

Wow, mooie site.
En die fijne afrekenen pagina is wel heel handig. Welke module is dat? Leuk om te hebben

Ik krijg ook een lege pagina op designvazen.nl. (FF)
meestal dus een server error.
Gooi de .htaccess eens weg. Dan kijken we verder.


Dat is deze module: http://www.canin.sk/prestashop/presta-modules/17-one-page-checkout.html

I deleted the .htaccess file and created a new one with prestashop, but it still doesn't work.


My error log shows errors, the main error is file does not exist ..... public_html/favicon.ico.
So I uploaded the favicon.ico into the public_html root.

It doesn't help.

Any other suggestions?

Thanks for your help! I really appreciate it!
And Tomer, thanks for the module. I bought it and its great.
Link to comment
Share on other sites

  • 4 weeks later...

Hi MrLoud and other helping angels,

I am trying to move a shop placed in a subdirectory on one server to the root on a new server with a new domain name. Backed up the database and the shop.

1. copied the data base to the new server
2. copied the backed up shop to the root (public_html)
3. changed permissions
4. changed file settings.inc.php so they match site and data base

Still can't open the shop. What am I missig?

Any help would be very much appriciated
:-)

Link to comment
Share on other sites

Hi MrLoud and other helping angels,

I am trying to move a shop placed in a subdirectory on one server to the root on a new server with a new domain name. Backed up the database and the shop.

1. copied the data base to the new server
2. copied the backed up shop to the root (public_html)
3. changed permissions
4. changed file settings.inc.php so they match site and data base

Still can't open the shop. What am I missig?

Any help would be very much appriciated
:-)


I'm at the same point, but I am wondering: Where do you this file settings.inc.php ?
Link to comment
Share on other sites

Hi jeepsterdk

In the config folder there is a file settings.inc.php. You would need an FTP program to change this file. If you don't have one I recomend filezila - free and works very well.

Hope this helps

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...