attivare mod_rewrite su VPS linux aruba
-
il file .htaccess si trova nella cartella "cartellaInizio" ed e' quello di prestashop:
startDo 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
+++---prestashop.com - +++---prestashop.com/forums
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule . - [E=REWRITEBASE:/cartellaInizio/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule ^images_ie/?([^/]+).(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule . - [E=REWRITEBASE:/magasin/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule ^images_ie/?([^/]+).(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
</IfModule>#If rewrite mod isn't enabled
ErrorDocument 404 /cartellaInizio/index.php?controller=404endDo not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again -
-
ciao Juanin, scusa per il ritardo, ma sono sommerso di lavoro.
Facendo la prova con il redirect 301, mi da: "Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error. More information about this error may be available in the server error log." -
-
redirect 301 /pag1.html href="nomedominio.com/cartellaInizio/pag2.html
-
-
provato, non fa niente, se invece provo cosi':
RewriteEngine on
RewriteCond %{HTTP_HOST} ^.$
RewriteRule ^(.)$ nomedominio.it [R=301,L]mi reindirizza tranquillamente su un altro sito
-
-
ok, mi hai dato una bella e una brutta notizia insieme!
Quindi, per esclusione, il problema e' di prestashop.
Hai idea di cosa puo' essere vedendo l'htaccess creato da prestashop? Il problema puo' essere che il file si trovi in una sotto cartella (cartellaInizio), piuttosto che nella root principale? Non so piu' dove mettere manoHo notato che se imposto nel pannello di controllo di prestashop, la funzione per la riscrittura degli url, il file htaccess cambia e rispetto a quello che ti ho postato prima diventa cosi':
startDo 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
+++---prestashop.com - +++---prestashop.com/forums
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule . - [E=REWRITEBASE:/cartellaInizio/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]Images
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule ^([0-9])(-[_a-zA-Z0-9-])?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^---dominio.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} ^---dominio.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} ^---dominio.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} ^---dominio.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} ^---dominio.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} ^---dominio.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} ^---dominio.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} ^---dominio.com$
RewriteRule ^c/([0-9]+)(-[._a-zA-Z0-9-])(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule ^images_ie/?([^/]+).(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule . - [E=REWRITEBASE:/magasin/]
RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$1 [QSA,L]Images
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule ^([0-9])(-[_a-zA-Z0-9-])?(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^---dominio.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} ^---dominio.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} ^---dominio.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} ^---dominio.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} ^---dominio.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} ^---dominio.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} ^---dominio.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} ^---dominio.com$
RewriteRule ^c/([0-9]+)(-[._a-zA-Z0-9-])(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule ^c/([a-zA-Z-]+)(-[0-9]+)?/.+.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]AlphaImageLoader for IE and fancybox
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule ^images_ie/?([^/]+).(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$2 [L]Dispatcher
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule ^.$ - [NC,L]
RewriteCond %{HTTP_HOST} ^---dominio.com$
RewriteRule ^.$ %{ENV:REWRITEBASE}index.php [NC,L]
</IfModule>#If rewrite mod isn't enabled
ErrorDocument 404 /dominio/index.php?controller=404endDo not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again -
-
Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.
Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.
Con il tuo contributo, questo post potrebbe essere ancora migliore 💗
Registrati Accedi
