franz66 Posted April 4 Share Posted April 4 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 More sharing options...
Knowband Plugins Posted April 4 Share Posted April 4 I don't think the system will work in this way. htaccess file, the PS URL structure might conflict in this case. Better to move the entire content to the root folder. I hope there are no files/folders with the same name in the root folder. Link to comment Share on other sites More sharing options...
franz66 Posted April 4 Author Share Posted April 4 thanks, then I will have to move all the files to the root... 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