Jump to content

Moving prestashop site to domain root


franz66

Recommended Posts

Hello,

I'll start by saying that I'm a PrestaShop newbie, I need to move a site created in PS ver. 1.7.8 from a subfolder to the root of the domain. Since there are other files/folders in the root, I thought of proceeding as I usually do with WP, that is, leaving the files in the folder and moving only the index.php to the root. In this regard, I moved the index and htaccess files to the root and modified the first by adding

require dirname(__FILE__).'/shop/config/config.inc.php';

$_SERVER['SCRIPT_FILENAME'] = __DIR__ . '/shop/index.php';
$_SERVER['SCRIPT_NAME'] = '/shop/index.php';
$_SERVER['PHP_SELF'] = '/shop/index.php';

and the htaccess file with these

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/shop/
RewriteRule ^(.*)$ /shop/$1 [L]

I changed the URL configuration in the Back Office:

Shop URL in https://mydomain.com/

Base URL in /shop/

I cleared the cache but I get Error 500 Internal Server Error on the domain URL.

Any suggestions on this? Has anyone ever tried this solution? I don't want to have to move all the content of the subfolder to the root.

Thanks

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...