Jump to content

[Risolto] Redirect Prestashop


idr

Recommended Posts

Salve!

ho installato correttamente Prestashop sul mio sito in una cartella che ho chiamato prestashop.

Ora il sito è visibile all’url: miosito.it/prestashop

Per visualizzare il sito su miosito.it (escludendo quindi /prestashop) cosa dovrei fare?

Grazie!

Edited by idr (see edit history)
Link to comment
Share on other sites

Grazie!!!

Ho attivato gli url friendly e ho inserito in index.php:

 

<?php

header("Refresh: 0; URL=http://www.miosito.it/prestashop");

?>

 

Ora funziona!

Grazie ancora!

 

Sebbene il metodo che hai usato funziona correttamente, è bene sapere che Google sconsiglia di usarlo:

 

http://support.googl...it&answer=79812

(ultima riga della tabella)

 

http://support.googl...it&answer=83105

 

Tuttavia è accertato che Google non tiene conto neanche delle sue stesse raccomandazioni:

 

http://andrea.techno...-poveri-vs-301/

 

In questi link c'è tutto il necessario per farsi un'idea su come impostare un redirect.

Personalmente preferisco il 301 per il semplice motivo che sarò preparato quando un domani Google rivedesse la sua politica permissivistica, lasciva e condizionata solo dal numero di visite, e si mettesse a fare esattamente quello che predica in giro.

Speranza vana ma almeno ho la coscienza a posto.

Link to comment
Share on other sites

Ti risposto nell'altro topic, però sarebbe utile agli altri utenti che cambiassi il titolo di questo topic con qualcosa di + consono, che aiuti gli altri utenti a trovare questa soluzione.

Ovviamente adovresti anche aggiungere [RISOLTO]. Così la cortesia è reciproca e dimostri di meritare altro aiuto in futuro.

http://www.prestasho...537#entry744537

Link to comment
Share on other sites

  • 5 months later...

Ciao a tutti, scusate se riesumo questo post, ma ho visto che eugenata è stato molto disponibile e competente ed avendo un problema analogo, non ho ancora trovato una soluzione funzionante:

 

ho ricreato uno shop online virtuemart con prestashop 1.5.2, adesso avrei bisogno di impostare alcuni redirect 301 relativi alle pagine prodotti precedenti, solo che ogni tentativo di aggiungere le righe necessarie nel .htaccess è stato vano.

 

ho provato in 2 modi:

es.1:

redirect 301 /e-shop?page=shop.product_details&flypage=flypage.tpl&product_id=951&category_id=233 http://www.i-vanity.com/1104-siero-viso-corpo-sangue-di-drago-diet-esthetic-100ml.html

es.2:

RewriteRule ^e-shop?page=shop.product_details&flypage=flypage.tpl&product_id=951&category_id=233 http://www.i-vanity.com/1104-siero-viso-corpo-sangue-di-drago-diet-esthetic-100ml.html [R=301,L]

 

ho provato a metterli in diversi posti dell'htaccess, ma in nessuno di questi ha funzionato, mi appare sempre la pagina del 404.

 

l'htaccess è il seguente:

 

 

 

 

# ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
# .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
# http://www.prestashop.com - http://www.prestashop.com/forums

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule . - [E=REWRITEBASE:/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]

# Images
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]

# Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^.*$ - [NC,L]
RewriteCond %{HTTP_HOST} ^www.i-vanity.com$
RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>

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

#If rewrite mod isn't enabled
ErrorDocument 404 /index.php?controller=404

# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again

 

 

Ogni aiuto è fortemente apprezzato.

Edited by nomealternativo (see edit history)
Link to comment
Share on other sites

  • 4 months later...

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