1

I need to migrate a site running on Prestashop 1.6.1.10 to the latest version. I have a problem: I uploaded the new version to a new folder called shop, but I can't access it due to .htaccess. Here is the content of the current .htaccess:

RewriteEngine On #created by aruba do not touch this file!
#ATTENTION: Remove file index.(php|html|htm)
RewriteCond %{REQUEST_URI} !^/negozio
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^(.*)$ negozio/$1 [L]

The problem is the following: with this file active, I cannot reach the folder from the browser (www.mionegozio.it/shop) to start the installation, while by renaming the .htaccess file I can access the file to be able to install but at the same time the current site doesn't work! I don't understand how to leave the current site reachable and still be able to access the folder containing the new version of Prestashop to be able to install.

Rob
  • 344
  • 3
  • 15
  • What was the previous directory name? What are the URLs? So, you are _changing_ the URL structure? – MrWhite Feb 24 '21 at 10:39
  • The current folder is called "shop", while the new "negozio". – Daniele Oreste Marino Feb 24 '21 at 10:43
  • 2
    Do not post answers within your question. Post them in the Answer section below. – Rob Feb 24 '21 at 11:01
  • You are not using the term "directory" consistently. On Unix, BSD--and Linux, too--they are "directories" and not the Windows concept of "folders" which is not the same thing. – Rob Feb 24 '21 at 11:03

1 Answers1

0

The solution, excluding the directory you wanted to access, by adding this line to the .htaccess file

RewriteRule ^ (shop) ($ | /) - [L]
Rob
  • 344
  • 3
  • 15
  • Except that the directive as posted is wholly invalid and can't simply be "added to the .htaccess file" since it won't do anything. (But the OP should be answering this question so they can provide more context, since this was _their_ solution.) – MrWhite Feb 24 '21 at 13:21
  • @MrWhite She posted that as her answer within her question. I only copied it here where it belongs and edited it out of her question. She states it solved her problem. – Rob Feb 24 '21 at 18:05