Reputation: 1668
I have developed a multilanguage prestashop store completely in localhost using xampp in mac and it works. Both the backoffice and the store (frontoffice). After that, i have deployed it to amazon but there comes my problem. The backoffice works but the store doesn't.
The browser just displays an apache 404 page and tells me The requested URL domain/prestashop/en/ was not found on this server. But it does exist. Besides, the backoffice confirms it.
Inspecting the error.log I find the following message:
[Thu Mar 12 11:12:37 2015] [error] [client xxx.xxx.xxx.xxx] File does not exist: /var/www/prestashop/en
For what I see, Apache is treating the language (/en/) as file when it is not. I've searched all across the web and I can't find how to fix it. I know it is a server issue, but somehow can't find the solution.
What's the matter here?
Upvotes: 12
Views: 7613
Reputation: 470
In my scope, in this file /etc/apache2/apache2.conf
This was the default:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
I changed it to:
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
And then restarted the apache2
service
Upvotes: 0
Reputation: 50254
Solution moved from @LeonardoLanchas's question post.
I fixed the issue doing the following steps:
- Deleted the root .htaccess.
- Cleared the smarty cache files under ./cache/smarty/compile
- Load the mod_rewrite module that was not installed: a2enmod rewrite
- Added the Allowoverride All directive to /etc/apache2/apache2.conf
<Directory /var/www/prestashop/> Options Indexes FollowSymLinks AllowOverride All </Directory>
- Restarted apache2: service apache2 restart
Upvotes: 0
Reputation: 334
I usually set my vhost in the following way
<Directory /var/www/prestashop/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Upvotes: 3