Jump to content

Index broken - 404


Recommended Posts

I'm not very lucky.

 

Installed PS 1.4.6.2 on my Windows machine for local debugging (I have a lots of cms installed, made by me or WP or Joomla) in http://myshop.local/

 

Testing index and admin, all was okay, did a minor setup to get url sef, italian language, disabled smarty cache, etc, all stuff to help developing.

 

I made a copy of default theme, selected it from admin, started to modify the global.css. Then went to admin to play around with languages. Enabled english, italian. Made italian the default.

 

Loaded the site on the browser: http://myshop.local/en/

 

Than back to admin, disabled english or whatever I don't exactly remember what I did, but I used the admin, no custom changes to the code whatsoever.

 

Now when I try to load:

 

http://myshop.local/

 

I keep being redirect to http://myshop.local/page-not-found ...

 

Other pages (product, etc) do work. The index does not :( How can this be possibile?

Link to comment
Share on other sites

I did it now from Preferences > SEO & URL, Save at the bottom. This is my .htaccess file:

 

# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# WARNING: PLEASE DO NOT MODIFY THIS FILE MANUALLY. IF NECESSARY, ADD YOUR SPECIFIC CONFIGURATION WITH THE HTACCESS GENERATOR IN BACK OFFICE
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
# URL rewriting module activation
RewriteEngine on
# URL rewriting rules
RewriteRule ^api/?(.*)$ /webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^([a-z0-9]+)\-([a-z0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2$3.jpg [L]
RewriteRule ^([0-9]+)\-([0-9]+)/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1-$2.jpg [L]
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$1$2.jpg [L]
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$1$2$3.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg [L]
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteRule ^c/([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L]
RewriteRule ^c/([a-zA-Z-]+)/[a-zA-Z0-9-]+\.jpg$ /img/c/$1.jpg [L]
RewriteRule ^([0-9]+)(\-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*\.jpg$ /img/c/$1$2.jpg [L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
RewriteRule ^[a-zA-Z0-9-]*/([0-9]+)\-[a-zA-Z0-9-]*\.html /product.php?id_product=$1 [QSA,L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]*(/[a-zA-Z0-9-]*)+ /category.php?id_category=$1&noredirect=1 [QSA,L]
RewriteRule ^([0-9]+)\-[a-zA-Z0-9-]* /category.php?id_category=$1 [QSA,L]
RewriteRule ^([0-9]+)__([a-zA-Z0-9-]*) /supplier.php?id_supplier=$1 [QSA,L]
RewriteRule ^([0-9]+)_([a-zA-Z0-9-]*) /manufacturer.php?id_manufacturer=$1 [QSA,L]
RewriteRule ^content/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms=$1 [QSA,L]
RewriteRule ^content/category/([0-9]+)\-([a-zA-Z0-9-]*) /cms.php?id_cms_category=$1 [QSA,L]
RewriteRule ^pagina-non-trovata$ /404.php [QSA,L]
RewriteRule ^indirizzo$ /address.php [QSA,L]
RewriteRule ^indirizzi$ /addresses.php [QSA,L]
RewriteRule ^autenticazione$ /authentication.php [QSA,L]
RewriteRule ^vendite-migliori$ /best-sales.php [QSA,L]
RewriteRule ^carrello$ /cart.php [QSA,L]
RewriteRule ^contattaci$ /contact-form.php [QSA,L]
RewriteRule ^sconto$ /discount.php [QSA,L]
RewriteRule ^ospite-monitoraggio$ /guest-tracking.php [QSA,L]
RewriteRule ^storico-ordine$ /history.php [QSA,L]
RewriteRule ^identita$ /identity.php [QSA,L]
RewriteRule ^produttori$ /manufacturer.php [QSA,L]
RewriteRule ^il-mio-account$ /my-account.php [QSA,L]
RewriteRule ^nuovi-prodotti$ /new-products.php [QSA,L]
RewriteRule ^ordine$ /order.php [QSA,L]
RewriteRule ^seguito-ordine$ /order-follow.php [QSA,L]
RewriteRule ^ordine-veloce$ /order-opc.php [QSA,L]
RewriteRule ^nota-di-ordine$ /order-slip.php [QSA,L]
RewriteRule ^password-recupero$ /password.php [QSA,L]
RewriteRule ^riduzione-prezzi$ /prices-drop.php [QSA,L]
RewriteRule ^cerca$ /search.php [QSA,L]
RewriteRule ^sitemap$ /sitemap.php [QSA,L]
RewriteRule ^negozi$ /stores.php [QSA,L]
RewriteRule ^fornitore$ /supplier.php [QSA,L]
</IfModule>
# Catch 404 errors
ErrorDocument 404 /404.php
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType text/css "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 year"
</IfModule>
FileETag INode MTime Size
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>

Link to comment
Share on other sites

In this situation, you may just want to try deleting all the files and doing a clean installation, as the more changes you make with no success, the more difficult it can be to identify the root cause of your original issue. Plus, a clean reinstall will be much faster as well.

 

One bit of advice though for the reinstall: Even if you switch the default language to Italian, do not remove the English translation pack. I've seen several errors stemming from that, while it may not be what has caused you these problems, it's better not to mess with it when it has the potential to cause issues.

 

I hope this helps.

 

-Mike

Link to comment
Share on other sites

Okay, I'll try to reinstall, indeed at some point I had deactivated english. Thanks.

 

edit:

 

Doing some test, it seems it's working now. So I'll leave have both English and Italian enabled, but in the frontend I'm going to use only Italian, so i have removed the language switcher module.

 

Does the urls should all have /it/ in front? Even on the index? I'd like to have mysite.org rather than mysite.org/it/ as index.

Link to comment
Share on other sites

Hi DrLightman,

I'm glad that worked for you! As for the /it/, you need to leave the English translation installed, but that doesn't mean you can't deactivate it via the Back Office under Tools > Languages. Once you do that, you shouldn't have /it/ showing up anymore.

 

I hope this helps.

 

-Mike

Link to comment
Share on other sites

×
×
  • Create New...